Skip to content

Instantly share code, notes, and snippets.

<?php
require_once dirname(__DIR__).'/../../../../app/AppKernel.php';
/**
* Test case class helpful with Entity tests requiring the database interaction.
* For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead.
*/
abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase
{

PHPUnit API reference

  • version 3.6
# Symfony aliases
## Cache
alias sf_cache_clear="php app/console cache:clear" # Clears the cache
alias sf_cache_warmup="php app/console cache:warmup" # Warms up an empty cache
## Doctrine
alias sf_doctrine_="php app/console doctrine:cache:clear-metadata" # Clears all metadata cache for a entity manager
alias sf_doctrine_="php app/console doctrine:cache:clear-query" # Clears all query cache for a entity manager
alias sf_doctrine_="php app/console doctrine:cache:clear-result" # Clears result cache for a entity manager
alias sf_doctrine_="php app/console doctrine:database:create" # Creates the configured databases
# Symfony 2
alias sf='php app/console'
alias sf-vendors='php bin/vendors update'
alias sf-db='sf doctrine:database:drop --force && sf doctrine:database:create && sf doctrine:schema:update --force'
alias sf-fixtures='sf doctrine:fixtures:load'
alias sf-cc='rm -rf app/cache/* && rm -rf app/logs/* && sf cache:clear'
alias sf-assets='rm -rf web/bundles/* && sf assets:install --symlink web'
alias sf-acl='sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs && sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs'
# Widop Fixtures Bundle
@SofHad
SofHad / git-alias
Created February 19, 2015 11:33
Git alias
alias.co checkout
alias.ci commit
alias.rb rebase
alias.st status
alias.br branch
alias.submodule-pull-all submodule foreach git pull --all
alias.submodule-fetch-all submodule foreach git fetch --tags
alias.sup submodule update --init --recursive
alias.lol log --graph --decorate --pretty=oneline --abbrev-commit
alias.lola log --graph --decorate --pretty=oneline --abbrev-commit --all
@SofHad
SofHad / .vim_cheat_cheet.md
Last active December 22, 2015 09:42
VIM Cheat sheet #vim

Cursor movement

h - move left
j - move down
k - move up
l - move right
ctrl-b - page up
ctrl-f - page down

% - jump to matching brace