Skip to content

Instantly share code, notes, and snippets.

View tuongaz's full-sized avatar
🏠
Working from home

Tuong Le tuongaz

🏠
Working from home
View GitHub Profile
@tuongaz
tuongaz / test_bootstrap.php
Created April 10, 2012 11:46
Bootstrap for PHPUnit in Symfony2
<?php
// in /app/my_phpunit_bootstrap.php:
require_once __DIR__.'/bootstrap.php.cache';
require_once __DIR__.'/AppKernel.php';
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Input\ArrayInput;
@tuongaz
tuongaz / BaseModelManager.php
Created April 1, 2012 03:51
Symfony2 Model Manager
<?php
abstract class BaseModelManager {
protected $em;
protected $class;
protected $repository;
protected $container;
/**
* Constructor.