/**
  * Drops our development DB tables
  * 
  * @access public
  * @return bool
  * 
  */
 public function drop()
 {
     if ($this->_fixMan->tablesPresent()) {
         return $this->_fixMan->dropTables();
     }
     return false;
 }
Пример #2
0
 /**
  * Used to call our CRUD methods, which we use to control our DB state (clean, truncate, delete, etc).
  * 
  * @access  private
  * @param   String    $call   The call we want to make.
  * @return  bool
  * 
  */
 protected function _callMethod($call)
 {
     try {
         $result = $this->_fixMan->fixtureMethodCheck($call, $this);
     } catch (Exception $e) {
         $result = false;
         $e->getMessage();
     }
     return $result;
 }
Пример #3
0
 public function testFixtureManagerClean()
 {
     $fixtures = array_map(function ($val) {
         return './tests/Support/TestsFixtures/' . $val;
     }, $this->fixtures);
     $fixtureManager = FixtureManager::create($fixtures);
     $fixtureManager->setDefaultPDOPersister($_ENV['pdo_host'], $_ENV['pdo_database'], $_ENV['pdo_username'], $_ENV['pdo_password'])->persist()->cleanStorage();
     $rowsCountry = $this->getConnection()->query('SELECT count(1) FROM country_region;')->fetchColumn();
     $rowsSuburd = $this->getConnection()->query('SELECT count(1) FROM customer_address_region_suburb;')->fetchColumn();
     $this->assertEquals(0, $rowsCountry);
     $this->assertEquals(0, $rowsSuburd);
 }