예제 #1
0
 public function tearDown()
 {
     if (count($this->tables)) {
         if (in_array('BlockTypes', $this->tables)) {
             $this->tables[] = 'btCoreScrapbookDisplay';
         }
         foreach ($this->tables as $table) {
             // drop table
             $conn = $this->getConnection();
             $pdo = $conn->getConnection();
             $pdo->exec("DROP TABLE IF EXISTS `{$table}`;");
         }
     }
     $allTables = $this->getDataSet($this->fixtures)->getTableNames();
     foreach ($allTables as $table) {
         // drop table
         $conn = $this->getConnection();
         $pdo = $conn->getConnection();
         $pdo->exec("DROP TABLE IF EXISTS `{$table}`;");
     }
     $db = Loader::db();
     $db->getEntityManager()->clear();
     \CacheLocal::flush();
     parent::tearDown();
 }
예제 #2
0
		public function refreshCache() {
			CacheLocal::flush();
		}