public function tearDown() { Galleries::remove(); Galleries::reset(); }
public function tearDown() { $this->_db->dropSchema('galleries'); Galleries::reset(); }
public function testOneToManyUsingSameKeyName() { Fixtures::drop('db', array('galleries')); $fixture = Fixtures::get('db', 'galleries'); $fixture->alter('change', 'id', array('to' => 'gallery_id')); Fixtures::save('db', array('galleries')); Galleries::reset(); Galleries::config(array('meta' => array('connection' => $this->_connection, 'key' => 'gallery_id'))); $opts = array('conditions' => array('Galleries.gallery_id' => 1)); $query = new Query($opts + array('type' => 'read', 'model' => 'lithium\\tests\\fixture\\model\\gallery\\Galleries', 'source' => 'galleries', 'alias' => 'Galleries', 'with' => array('Images'))); $galleries = $this->_db->read($query); $this->assertCount(3, $galleries->first()->images); }
/** * Dropping the test database */ public function tearDown() { Fixtures::clear('db'); Galleries::reset(); }