本文整理汇总了PHP中Test::end方法的典型用法代码示例。如果您正苦于以下问题:PHP Test::end方法的具体用法?PHP Test::end怎么用?PHP Test::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Test
的用法示例。
在下文中一共展示了Test::end方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runAll
public static function runAll()
{
foreach (TestRunner::$collection as $classname => $testData) {
$testClass = new $classname();
Test::setClassname($classname);
foreach ($testData["methods"] as $testMethod) {
Test::setMethodname($testMethod);
if ($testData['setUp']) {
$testClass->setUp();
}
$testClass->{$testMethod}();
if ($testData['tearDown']) {
$testClass->tearDown();
}
}
Test::report();
}
TestRunner::reset();
Test::end();
}
示例2: array
<?php
require_once "../PUnit.php";
echo "Tautology: ";
Test::assertTrue(true);
Test::report();
echo "Multi with failure: ";
Test::assertEqual("abc", "123");
Test::assertEqual(12.3, 12.3);
Test::assertEqual(array("joe", "bloggs"), array("joe", "bloggs"));
Test::report();
echo "Deep array failure: ";
$expected = array("data" => true, "structure" => array("top" => 123, "left" => "abc"));
$actual = array("data" => true, "structure" => array("top" => 123, "left" => "abcde"));
Test::assertEqual($expected, $actual);
Test::report();
Test::end();