本文整理汇总了PHP中Reader::getSuites方法的典型用法代码示例。如果您正苦于以下问题:PHP Reader::getSuites方法的具体用法?PHP Reader::getSuites怎么用?PHP Reader::getSuites使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reader
的用法示例。
在下文中一共展示了Reader::getSuites方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testResultWithSystemOut
public function testResultWithSystemOut()
{
$customLog = "\nCustom error log on result test with ";
$result = FIXTURES . DS . 'results' . DS . 'mixed-results-with-system-out.xml';
$failLog = self::extractLog()->failure . $customLog . "failure!";
$errorLog = self::extractLog()->error . $customLog . "error!";
$node = new Reader($result);
$resultFail = $node->getSuites()[0]->suites[2]->cases[1]->failures[0]['text'];
$resultError = $node->getSuites()[0]->suites[1]->cases[1]->errors[0]['text'];
$this->assertEquals($failLog, $resultFail);
$this->assertEquals($errorLog, $resultError);
}
示例2: testResultWithSystemOut
public function testResultWithSystemOut()
{
$result = FIXTURES . DS . 'results' . DS . 'mixed-results-with-system-out.xml';
$failLog = "UnitTestWithMethodAnnotationsTest::testFalsehood\nFailed asserting that true is false.\n\n/home/brian/Projects/parallel-phpunit/test/fixtures/tests/UnitTestWithMethodAnnotationsTest.php:18\nCustom error log on result test with failure!";
$errorLog = "UnitTestWithErrorTest::testTruth\nException: Error!!!\n\n/home/brian/Projects/parallel-phpunit/test/fixtures/tests/UnitTestWithErrorTest.php:12\nCustom error log on result test with error!";
$node = new Reader($result);
$resultFail = $node->getSuites()[0]->suites[2]->cases[1]->failures[0]['text'];
$resultError = $node->getSuites()[0]->suites[1]->cases[1]->errors[0]['text'];
\PHPUnit_Framework_TestCase::assertEquals($failLog, $resultFail);
\PHPUnit_Framework_TestCase::assertEquals($errorLog, $resultError);
}