Ejemplo n.º 1
0
 /**
  * @test
  */
 public function getAllTableNamesNotContainsInexistentTable()
 {
     self::assertFalse(in_array('tx_oelib_doesnotexist', Tx_Oelib_Db::getAllTableNames(), TRUE));
 }
Ejemplo n.º 2
0
 /**
  * Generates a list of additional allowed tables to which this instance of
  * the testing framework has access to create/remove test records.
  *
  * The generated list is based on the list of all tables that TYPO3 can
  * access (which will be all tables in this database), filtered by the
  * prefixes of additional extensions.
  *
  * The array with the allowed table names is written directly to
  * $this->additionalAllowedTables.
  *
  * @return void
  */
 protected function createListOfAdditionalAllowedTables()
 {
     $allTables = implode(',', Tx_Oelib_Db::getAllTableNames());
     $additionalTablePrefixes = implode('|', $this->additionalTablePrefixes);
     $matches = array();
     preg_match_all('/((' . $additionalTablePrefixes . ')_[a-z0-9]+[a-z0-9_]*)(,|$)/', $allTables, $matches);
     if (isset($matches[1])) {
         $this->additionalAllowedTables = $matches[1];
     }
 }