本文整理汇总了PHP中PHPUnit_Framework_Test::getActualOutput方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_Test::getActualOutput方法的具体用法?PHP PHPUnit_Framework_Test::getActualOutput怎么用?PHP PHPUnit_Framework_Test::getActualOutput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_Test
的用法示例。
在下文中一共展示了PHPUnit_Framework_Test::getActualOutput方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addResult
protected function addResult($type, PHPUnit_Framework_Test &$test, &$e, $time)
{
array_push($this->current_suite()->results->{$type}, (object) array('test' => &$test, 'exception' => &$e, 'time' => $time));
$this->test->exceptions[] = array('exception' => $e, 'time' => $time);
$this->runner->print_output($test->getName(), $test->getActualOutput());
$this->runner->print_status($type);
}
示例2: endTest
/**
* A test ended.
*
* @param PHPUnit_Framework_Test $test
* @param float $time
*/
public function endTest(PHPUnit_Framework_Test $test, $time)
{
if ($this->currentTestPass) {
$this->write(sprintf('test passed in %.3f sec.', $time));
}
echo $test->getActualOutput();
}
示例3: endTest
/**
* A test ended.
*
* @param PHPUnit_Framework_Test $test
* @param float $time
*/
public function endTest(PHPUnit_Framework_Test $test, $time)
{
if ($test instanceof PHPUnit_Framework_TestCase) {
if (!$test->hasPerformedExpectationsOnOutput()) {
echo $test->getActualOutput();
}
}
}
示例4: writeDiagnostics
/**
* @param PHPUnit_Framework_Test $test
*/
private function writeDiagnostics(PHPUnit_Framework_Test $test)
{
if (!$test instanceof PHPUnit_Framework_TestCase) {
return;
}
if (!$test->hasOutput()) {
return;
}
foreach (explode("\n", trim($test->getActualOutput())) as $line) {
$this->write(sprintf("# %s\n", $line));
}
}
示例5: endTest
/**
* A test ended.
*
* @param PHPUnit_Framework_Test $test
* @param float $time
*/
public function endTest(PHPUnit_Framework_Test $test, $time)
{
if (!$this->lastTestFailed) {
$this->writeProgress('.');
}
if ($test instanceof PHPUnit_Framework_TestCase) {
$this->numAssertions += $test->getNumAssertions();
} elseif ($test instanceof PHPUnit_Extensions_PhptTestCase) {
$this->numAssertions++;
}
$this->lastTestFailed = false;
if ($test instanceof PHPUnit_Framework_TestCase) {
if (!$test->hasExpectationOnOutput()) {
$this->write($test->getActualOutput());
}
}
}
示例6: endTest
/**
* A test ended.
*
* @param PHPUnit_Framework_Test $test
* @param float $time
*/
public function endTest(PHPUnit_Framework_Test $test, $time)
{
if (!$this->lastTestFailed) {
$this->writeProgress($this->green('.'));
}
if ($test instanceof PHPUnit_Framework_TestCase) {
$this->numAssertions += $test->getNumAssertions();
} else {
if ($test instanceof PHPUnit_Extensions_PhptTestCase) {
$this->numAssertions++;
}
}
$this->lastTestFailed = FALSE;
if ($this->verbose && $test instanceof PHPUnit_Framework_TestCase) {
$this->write($test->getActualOutput());
}
}
示例7: endTest
/**
* A test ended.
*
* @param PHPUnit_Framework_Test $test Test case
* @param float $time Time taken
*
* @return void
*/
public function endTest(PHPUnit_Framework_Test $test, $time)
{
$this->runs[] = array('name' => $test->getName(), 'size' => $test->getSize(), 'status' => $test->getStatus(), 'statusMessage' => $test->getStatusMessage(), 'assertions' => $test->getNumAssertions(), 'result' => $test->getResult(), 'annotations' => $test->getAnnotations(), 'timeTaken' => $time, 'output' => $test->getActualOutput());
}