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]); }
/** * 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'); }
/** * 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()); } }
public function setUp() { Fixtures::config(['db' => ['adapter' => 'Connection', 'connection' => $this->_connection, 'fixtures' => $this->_fixtures]]); }
/** * 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')); }
/** * 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]]); }