コード例 #1
0
 public function testConstructPassedParams()
 {
     Fixtures::reset();
     $config = array('adapter' => 'li3_fixtures\\tests\\mocks\\core\\MockLogCall', 'fixtures' => array('image' => 'name\\spa\\ce', 'gallery' => 'na\\mespac\\e'));
     Fixtures::config(array('fixture_test' => $config));
     $callable = Fixtures::adapter('fixture_test');
     $expected = $config + array('filters' => array());
     $this->assertEqual($expected, $callable->construct[0]);
 }
コード例 #2
0
ファイル: DatabaseTest.php プロジェクト: rapzo/lithium
 /**
  * Creating the test database
  */
 public function setUp()
 {
     $options = array('db' => array('adapter' => 'Connection', 'connection' => $this->_connection, 'fixtures' => $this->_fixtures));
     if ($this->with('PostgreSql')) {
         $options['db']['alters']['change']['id'] = array('value' => function ($id) {
             return (object) 'default';
         });
     }
     Fixtures::config($options);
     Fixtures::save('db');
 }
コード例 #3
0
ファイル: FieldsTest.php プロジェクト: nilamdoc/KYCGlobal
 /**
  * Creating the test database
  */
 public function setUp()
 {
     Fixtures::config(array('db' => array('adapter' => 'Connection', 'connection' => $this->_connection, 'fixtures' => $this->_fixtures)));
     Fixtures::create('db');
     $db = $this->_db;
     if (!$db::enabled('schema')) {
         $gallery = Fixtures::get('db', 'galleries');
         $images = Fixtures::get('db', 'images');
         Galleries::schema($gallery->fields());
         Images::schema($images->fields());
     }
 }
コード例 #4
0
ファイル: AclNodeTest.php プロジェクト: jails/li3_access
 public function setUp()
 {
     Fixtures::config(['db' => ['adapter' => 'Connection', 'connection' => $this->_connection, 'fixtures' => $this->_fixtures]]);
 }
コード例 #5
0
ファイル: CrudTest.php プロジェクト: fedeisas/lithium
 /**
  * Creating the test database
  */
 public function setUp()
 {
     Fixtures::config(array('db' => array('adapter' => 'Connection', 'connection' => $this->_connection, 'fixtures' => $this->_fixtures)));
     Fixtures::create('db', array('galleries'));
 }
コード例 #6
0
ファイル: TreeTest.php プロジェクト: jails/li3_tree
 /**
  * Creating the test database
  *
  */
 public function setUp()
 {
     Fixtures::config(['db' => ['adapter' => 'Connection', 'connection' => $this->_connection, 'fixtures' => $this->_fixtures]]);
     Comment::config(['meta' => ['connection' => $this->_connection]]);
     Image::config(['meta' => ['connection' => $this->_connection]]);
 }