本文整理汇总了PHP中TestRunner::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP TestRunner::tearDown方法的具体用法?PHP TestRunner::tearDown怎么用?PHP TestRunner::tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestRunner
的用法示例。
在下文中一共展示了TestRunner::tearDown方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
public function tearDown()
{
echo "ps aux | grep " . $this->appName . " | grep -v grep | grep -v " . end(explode("/", __FILE__)) . " | awk '{print \$2}'";
exec("ps aux | grep " . $this->appName . " | grep -v grep | grep -v " . end(explode("/", __FILE__)) . " | awk '{print \$2}'", $result, $status);
if ($status > 0) {
$this->console('Failed to find child');
return FAILURE;
}
if (is_array($result) && count($result) > 0) {
exec("kill " . $result[0], $result, $status);
return FAILURE;
} else {
$this->console("Failed to find child. Does the process exist?");
return FAILURE;
}
$this->console("Killed iPhone app proccess");
return parent::tearDown();
}
示例2: tearDown
public function tearDown()
{
return parent::tearDown();
}
示例3: tearDown
/**
* @OVERRIDE
*
* Overridden to prevent deletion of custom defined tmpdb
*
* @global type $TESTING_CONFIG
*/
function tearDown()
{
global $TESTING_CONFIG;
if (!isset($TESTING_CONFIG['database'])) {
parent::tearDown();
}
if (PHP_SAPI != 'cli') {
DB::set_alternative_database_name(null);
}
}