本文整理汇总了PHP中PHPUnit_Extensions_Database_TestCase::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Extensions_Database_TestCase::tearDown方法的具体用法?PHP PHPUnit_Extensions_Database_TestCase::tearDown怎么用?PHP PHPUnit_Extensions_Database_TestCase::tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Extensions_Database_TestCase
的用法示例。
在下文中一共展示了PHPUnit_Extensions_Database_TestCase::tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
protected function tearDown()
{
parent::tearDown();
$this->conn->close();
$this->conn = null;
self::$pdo = null;
}
示例2: tearDown
protected function tearDown()
{
for ($i = 1; $i < self::$connPointer; $i++) {
unlink(__DIR__ . DIRECTORY_SEPARATOR . 'test' . $i . '.sqlite');
}
self::$connPointer = 0;
parent::tearDown();
}
示例3: tearDown
protected function tearDown()
{
parent::tearDown();
// Close all database connections from this test
if (!empty($this->db_connections)) {
foreach ($this->db_connections as $db) {
$db->sql_close();
}
}
}
示例4: tearDown
public function tearDown()
{
$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}`;");
}
parent::tearDown();
}
示例5: tearDown
public function tearDown()
{
$conn = $this->getConnection();
$pdo = $conn->getConnection();
$pdo->exec("DROP TABLE IF EXISTS `tags`;");
$pdo->exec("DROP TABLE IF EXISTS `metadata`;");
$pdo->exec("DROP TABLE IF EXISTS `images`;");
$pdo->exec("DROP TABLE IF EXISTS `users`;");
$pdo->exec("DROP TABLE IF EXISTS `albums`;");
parent::tearDown();
}
示例6: tearDown
public function tearDown()
{
if (count($this->tables)) {
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();
parent::tearDown();
}
示例7: tearDown
/**
* tearDown after each tests
*/
public function tearDown()
{
parent::tearDown();
}
示例8: tearDown
/**
* Cleans up the environment after running a test.
*/
protected function tearDown()
{
// TODO Auto-generated SenditTest::tearDown()
$this->Sendit = null;
parent::tearDown();
}
示例9: tearDown
/**
* Restores the original environment overriden with setEnvironment()
*
* Extending classes that have their own tearDown()
* should call parent::tearDown()
*/
public function tearDown()
{
$this->_helpers->restore_environment();
return parent::tearDown();
}
示例10: tearDown
/**
* @inheritdoc
*/
protected function tearDown()
{
parent::tearDown();
FileHelper::removeDirectory(__DIR__ . '/upload');
}
示例11: tearDown
protected function tearDown()
{
$this->getDI()->reset();
parent::tearDown();
}
示例12: tearDown
public function tearDown()
{
DB::rollback();
parent::tearDown();
self::$_oldDataset = $this->_dataset;
}
示例13: tearDown
public function tearDown()
{
$this->dropTable();
parent::tearDown();
}
示例14: tearDown
public function tearDown()
{
// Shutdown the kernel.
$this->kernel->shutdown();
parent::tearDown();
}
示例15: tearDown
public function tearDown()
{
parent::tearDown();
unlink($this->filename);
}