Skip to content

Instantly share code, notes, and snippets.

@heavenshell
Created May 17, 2011 15:56
Show Gist options
  • Save heavenshell/976730 to your computer and use it in GitHub Desktop.
Save heavenshell/976730 to your computer and use it in GitHub Desktop.
Stagehand_Testrunner report
<?php
class Sample
{
public function __construct()
{
}
public function add($x, $y)
{
return $x + $y;
}
}
<?php
require_once 'Sample.php';
class SampleTest extends \PHPUnit_Framework_TestCase
{
public function testShouldBeFail()
{
$calc = new Sample();
$this->assertSame($calc->add(1, 1), 3);
}
public function testShouldBeError()
{
$calc = new Sampl(); // This should be error
$this->assertSame($calc->add(1, 1), 3);
}
}
$ $ phpunit SampleTest.php
PHPUnit 3.5.13 by Sebastian Bergmann.
.FPHP Fatal error: Class 'Sampl' not found in /private/tmp/SampleTest.php on line 18
Fatal error: Class 'Sampl' not found in /private/tmp/SampleTest.php on line 18
PHPUnit 3.5.13 by Sebastian Bergmann.
.FPHP Fatal error: Class 'Sampl' not found in /private/tmp/SampleTest.php on line 18
PHP Stack trace:
PHP 1. {main}() /opt/local/bin/phpunitrunner:0
PHP 2. Stagehand_CLIController->run() /opt/local/bin/phpunitrunner:69
PHP 3. Stagehand_TestRunner_TestRunnerCLIController->doRun() /opt/local/lib/php/Stagehand/CLIController.php:101
PHP 4. Stagehand_TestRunner_TestRunnerCLIController->runTests() /opt/local/lib/php/Stagehand/TestRunner/TestRunnerCLIController.php:182
PHP 5. Stagehand_TestRunner_TestRunner->run() /opt/local/lib/php/Stagehand/TestRunner/TestRunnerCLIController.php:400
PHP 6. Stagehand_TestRunner_Runner_PHPUnitRunner->run($suite = class PHPUnit_Framework_TestSuite { protected $backupGlobals = NULL;protected
$backupStaticAttributes = NULL;protected $name = 'The test suite generated by
Stagehand_TestRunner';protected $groups = array ('__nogroup__' => array (0 => class
PHPUnit_Framework_TestSuite { protected $backupGlobals = NULL;protected
$backupStaticAttributes = NULL;protected $name = 'SampleTest';protected $groups =
array ('__nogroup__' => array (0 => class SampleTest { protected $backupGlobals =
NULL protected $backupGlobalsBlacklist = array ();protected $backupStaticAttributes
= NULL;protected $backupStaticAttributesBlacklist = array ();protected
$runTestInSeparateProcess = FALSE;protected $preserveGlobalState = TRUE;private
${PHPUnit_Framework_TestCase}:inIsolation = FALSE;private
${PHPUnit_Framework_TestCase}:data = array ();private
${PHPUnit_Framework_TestCase}:dataName = '';private
${PHPUnit_Framework_TestCase}:useErrorHandler = NULL;private
${PHPUnit_Framework_TestCase}:useOutputBuffering = NULL;private
${PHPUnit_Framework_TestCase}:expectedException = NULL;private
${PHPUnit_Framework_TestCase}:expectedExceptionMessage = '';private
${PHPUnit_Framework_TestCase}:expectedExceptionCode = NULL;private
${PHPUnit_Framework_TestCase}:expectedExceptionTrace = array ();private
${PHPUnit_Framework_TestCase}:name = 'testShouldWorkOk';private
${PHPUnit_Framework_TestCase}:dependencies = array ();private
${PHPUnit_Framework_TestCase}:dependencyInput = array ();private
${PHPUnit_Framework_TestCase}:exceptionMessage = NULL;private
${PHPUnit_Framework_TestCase}:exceptionCode = 0;private
${PHPUnit_Framework_TestCase}:iniSettings = array ();private
${PHPUnit_Framework_TestCase}:locale = array ();private
${PHPUnit_Framework_TestCase}:mockObjects = array ();private
${PHPUnit_Framework_TestCase}:status = 0;private
${PHPUnit_Framework_TestCase}:statusMessage = '';private
${PHPUnit_Framework_TestCase}:numAssertions = 1;private
${PHPUnit_Framework_TestCase}:result = NULL private
${PHPUnit_Framework_TestCase}:testResult = NULL }, 1 => class SampleTest {
protected $backupGlobals = NULL
-snip-
private ${PHPUnit_Framework_TestCase}:testResult = NULL }, array ()) /opt/local/lib/php/PHPUnit/Framework/TestCase.php:738
PHP 16. SampleTest->testShouldBeError() /private/tmp/SampleTest.php:0
Fatal error: Class 'Sampl' not found in /private/tmp/SampleTest.php on line 18
Call Stack:
0.0007 647976 1. {main}() /opt/local/bin/phpunitrunner:0
-snip-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment