Наследование: extends PHPUnit_Framework_TestCas\PHPUnit_Framework_TestCase
Пример #1
0
 public function setUp()
 {
     $driver = Config::getValue('db', 'driver');
     if ($driver == 'sqlite') {
         $this->markTestSkipped('This test is not for SQLite database.');
     }
     parent::setUp();
 }
Пример #2
0
 public function __construct($name = null, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     $this->injectorConfig = new InjectorConfig();
     $this->frontControllerBindings($this->injectorConfig);
     $injector = new Injector($this->injectorConfig);
     $this->frontController = $injector->getInstance('\\Ouzo\\FrontController');
 }
 public function setUp()
 {
     parent::setUp();
     $this->_category = Category::create(array('name' => 'sony'));
     Product::create(array('name' => 'bob', 'id_category' => $this->_category->getId()));
     Product::create(array('name' => 'billy', 'id_category' => $this->_category->getId()));
     Product::create(array('name' => 'peter', 'id_category' => $this->_category->getId()));
 }
Пример #4
0
 public function setUp()
 {
     parent::setUp();
     /** @var User $user */
     $user = User::create(['login' => 'A']);
     $this->game = $game = Game::create(['type' => '101']);
     $this->gameUser = $gameUser = GameUser::create(['game_id' => $game->getId(), 'user_id' => $user->getId()]);
     $game->updateAttributes(['current_game_user_id' => $gameUser->getId()]);
 }
Пример #5
0
 public function setUp()
 {
     parent::setUp();
     new View('test');
 }
Пример #6
0
 public function setUp()
 {
     parent::setUp();
     $_SESSION = array();
 }
Пример #7
0
 public function setUp()
 {
     parent::setUp();
     ModelDefinition::resetCache();
 }