本文整理汇总了PHP中TestRunner::teardownEnv方法的典型用法代码示例。如果您正苦于以下问题:PHP TestRunner::teardownEnv方法的具体用法?PHP TestRunner::teardownEnv怎么用?PHP TestRunner::teardownEnv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestRunner
的用法示例。
在下文中一共展示了TestRunner::teardownEnv方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runFile
/** A method to run a single test file.
*
* @param string $layer The name of a layer group to run.
* @param string $folder The folder group to run, not including "tests/unit"
* @param string $file The file to run, including ".test.php"
*/
function runFile($layer, $folder, $file)
{
$type = $GLOBALS['_MAX']['TEST']['test_type'];
// Set up the environment for the test
TestRunner::setupEnv($layer);
$configBefore = TestEnv::parseConfigFile();
// Add the test file to a SimpleTest group
$testName = $this->_testName($layer, $folder, $file);
$secondaryName = $this->_secondaryTestName($layer);
$test = new GroupTest($testName, $secondaryName);
$testFile = MAX_PROJECT_PATH . '/' . $folder . '/' . constant($type . '_TEST_STORE') . '/' . $file;
$test->addTestFile($testFile);
$this->runCase($test);
// Tear down the environment for the test
$configAfter = TestEnv::parseConfigFile();
$configDiff = array_diff_assoc_recursive($configBefore, $configAfter);
if (!empty($configDiff)) {
OA::debug("Config file was changed by test: {$folder} {$file}", PEAR_LOG_DEBUG);
}
TestRunner::teardownEnv($layer);
}