com phpruntests: adding a teststatus object: src/testcase/rtPhpTest.php src/testcase/rtTestStatus.php tests/testcase/rtCleanExecutionTest.php
tests/testcase/rtCookieExecutionTest.php tests/testcase/rtDeflatePostExecutionTest.php tests/testcase/rtExpectHeadersExecutionTest.php
tests/testcase/rtGetExecutionTest.php tests/testcase/rtGzipPostExecutionTest.php tests/testcase/rtPhpTestTest.php
tests/testcase/rtPostExecutionTest.php tests/testcase/rtPos
| From: | David Soria Parra | Date: | Tue, 02 Jun 2009 11:49:57 +0000 |
| Subject: | com phpruntests: adding a teststatus object: src/testcase/rtPhpTest.php src/testcase/rtTestStatus.php tests/testcase/rtCleanExecutionTest.php tests/testcase/rtCookieExecutionTest.php tests/testcase/rtDeflatePostExecutionTest.php tests/testcase/rtExpectHeadersExecutionTest.php tests/testcase/rtGetExecutionTest.php tests/testcase/rtGzipPostExecutionTest.php tests/testcase/rtPhpTestTest.php tests/testcase/rtPostExecutionTest.php tests/testcase/rtPos |
||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-66429@lists.php.net to get a copy of this message | ||
Commit: 5af19f18e47d77041c94fe0788891debb5f049fb
Author: Zoe Slattery <zoe@php.net> Tue, 2 Jun 2009 11:49:57 +0000
Parents: fc766c8f7012dbaca871ae9f289f3d9e195eb481
Branches: master
Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=5af19f18e47d77041c94fe0788891debb5f049fb
Log:
adding a teststatus object
Changed paths:
M src/testcase/rtPhpTest.php
A src/testcase/rtTestStatus.php
M tests/testcase/rtCleanExecutionTest.php
M tests/testcase/rtCookieExecutionTest.php
M tests/testcase/rtDeflatePostExecutionTest.php
M tests/testcase/rtExpectHeadersExecutionTest.php
M tests/testcase/rtGetExecutionTest.php
M tests/testcase/rtGzipPostExecutionTest.php
M tests/testcase/rtPhpTestTest.php
M tests/testcase/rtPostExecutionTest.php
M tests/testcase/rtPostRawExecutionTest.php
M tests/testcase/rtSkipIfExecutionTest.php
M tests/testcase/rtTestExecutionTest..php
M tests/testcase/rtTestOutputWriterTest.php
M tests/testcase/rtTestResultsTest.php
diff --git a/src/testcase/rtPhpTest.php b/src/testcase/rtPhpTest.php index 7b40131..e3b5cfe 100644 --- a/src/testcase/rtPhpTest.php +++ b/src/testcase/rtPhpTest.php @@ -19,17 +19,19 @@ class rtPhpTest private $testName; private $contents; private $status; + private $testStatus; private $output; private $sections; private $fileSection; private $expectSection; private $sectionHeadings; - public function __construct(array $contents, $testName, $sectionHeadings, $runConfiguration) + public function __construct(array $contents, $testName, $sectionHeadings, $runConfiguration, $testStatus) { $this->contents = $contents; $this->testName = $testName; $this->sectionHeadings = $sectionHeadings; + $this->testStatus = $testStatus; $this->parse(); $this->init($runConfiguration); } diff --git a/src/testcase/rtTestStatus.php b/src/testcase/rtTestStatus.php new file mode 100644 index 0000000..e5b4693 --- /dev/null +++ b/src/testcase/rtTestStatus.php @@ -0,0 +1,17 @@ +<?php +/** + * rtTestStatus + * + * This class represents the status (PASS, FAIL etc) of a single test case. + * + * @category Testing + * @package RUNTESTS + * @author Zoe Slattery <zoe@php.net> + * @author Stefan Priebsch <spriebsch@php.net> + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * + */ +class rtTestStatus { +} +?> \ No newline at end of file diff --git a/tests/testcase/rtCleanExecutionTest.php b/tests/testcase/rtCleanExecutionTest.php index 634d5ac..3a79517 100644 --- a/tests/testcase/rtCleanExecutionTest.php +++ b/tests/testcase/rtCleanExecutionTest.php @@ -40,7 +40,8 @@ class rtCleanExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -66,7 +67,8 @@ class rtCleanExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtCookieExecutionTest.php b/tests/testcase/rtCookieExecutionTest.php index f5df417..611ffab 100644 --- a/tests/testcase/rtCookieExecutionTest.php +++ b/tests/testcase/rtCookieExecutionTest.php @@ -39,7 +39,8 @@ class rtCookieExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtDeflatePostExecutionTest.php b/tests/testcase/rtDeflatePostExecutionTest.php index 84dffb5..b9618b1 100644 --- a/tests/testcase/rtDeflatePostExecutionTest.php +++ b/tests/testcase/rtDeflatePostExecutionTest.php @@ -18,7 +18,7 @@ class rtDeflatePostExecutionTest extends PHPUnit_Framework_TestCase public function tearDown() { - @unlink($this->path-to_tests . '/sample_deflatepost.php'); + @unlink($this->path_to_tests . '/sample_deflatepost.php'); } public function testFileRun() @@ -37,7 +37,8 @@ class rtDeflatePostExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtExpectHeadersExecutionTest.php b/tests/testcase/rtExpectHeadersExecutionTest.php index 3506f30..9e1cd34 100644 --- a/tests/testcase/rtExpectHeadersExecutionTest.php +++ b/tests/testcase/rtExpectHeadersExecutionTest.php @@ -41,16 +41,17 @@ class rtExpectHeadersExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); $output = $testCase->getOutput(); - $status = $testCase->getStatus(); + $stat = $testCase->getStatus(); $headers = $testCase->getHeaders(); - $this->assertEquals('', $status['pass']); + $this->assertEquals('', $stat['pass']); } @@ -70,13 +71,14 @@ class rtExpectHeadersExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); - $status = $testCase->getStatus(); + $stat = $testCase->getStatus(); - $this->assertEquals('headers', $status['fail']); + $this->assertEquals('headers', $stat['fail']); } } diff --git a/tests/testcase/rtGetExecutionTest.php b/tests/testcase/rtGetExecutionTest.php index 5aee10c..5019f8d 100644 --- a/tests/testcase/rtGetExecutionTest.php +++ b/tests/testcase/rtGetExecutionTest.php @@ -39,7 +39,8 @@ class rtGetExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -68,7 +69,8 @@ class rtGetExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtGzipPostExecutionTest.php b/tests/testcase/rtGzipPostExecutionTest.php index d3c1d2e..9b749f6 100644 --- a/tests/testcase/rtGzipPostExecutionTest.php +++ b/tests/testcase/rtGzipPostExecutionTest.php @@ -37,7 +37,8 @@ class rtGzipPostExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtPhpTestTest.php b/tests/testcase/rtPhpTestTest.php index 5ad3011..31d27f0 100644 --- a/tests/testcase/rtPhpTestTest.php +++ b/tests/testcase/rtPhpTestTest.php @@ -27,7 +27,8 @@ class rtPhpTestTest extends PHPUnit_Framework_TestCase $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt')); $config->configure(); - $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config); + $status = new rtTestStatus(); + $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config, $status); $this->assertEquals('rtPhpTest', get_class($test)); } @@ -37,7 +38,8 @@ class rtPhpTestTest extends PHPUnit_Framework_TestCase $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt')); $config->configure(); - $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config); + $status = new rtTestStatus(); + $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config, $status); $this->assertEquals('rtTestHeaderSection', get_class($test->getSection('TEST'))); $this->assertEquals('rtFileSection', get_class($test->getSection('FILE'))); @@ -49,7 +51,8 @@ class rtPhpTestTest extends PHPUnit_Framework_TestCase $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt')); $config->configure(); - $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config); + $status = new rtTestStatus(); + $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config, $status); // var_dump($test->getSection('FILE')); diff --git a/tests/testcase/rtPostExecutionTest.php b/tests/testcase/rtPostExecutionTest.php index 656a617..c168d6e 100644 --- a/tests/testcase/rtPostExecutionTest.php +++ b/tests/testcase/rtPostExecutionTest.php @@ -37,7 +37,8 @@ class rtPostExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtPostRawExecutionTest.php b/tests/testcase/rtPostRawExecutionTest.php index 3ebe972..60d7edf 100644 --- a/tests/testcase/rtPostRawExecutionTest.php +++ b/tests/testcase/rtPostRawExecutionTest.php @@ -37,7 +37,8 @@ class rtPostRawExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtSkipIfExecutionTest.php b/tests/testcase/rtSkipIfExecutionTest.php index 337e269..2dda29a 100644 --- a/tests/testcase/rtSkipIfExecutionTest.php +++ b/tests/testcase/rtSkipIfExecutionTest.php @@ -34,7 +34,8 @@ class rtSkipIfExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtTestExecutionTest.php b/tests/testcase/rtTestExecutionTest.php index 4f180e4..11e5ba1 100644 --- a/tests/testcase/rtTestExecutionTest.php +++ b/tests/testcase/rtTestExecutionTest.php @@ -44,7 +44,8 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -68,7 +69,8 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -92,7 +94,8 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -119,7 +122,8 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -146,7 +150,8 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtTestOutputWriterTest.php b/tests/testcase/rtTestOutputWriterTest.php index e9e65ae..9d5045a 100644 --- a/tests/testcase/rtTestOutputWriterTest.php +++ b/tests/testcase/rtTestOutputWriterTest.php @@ -42,7 +42,8 @@ class rtTestOutputWriterTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtTestResultsTest.php b/tests/testcase/rtTestResultsTest.php index 6ce5337..8b84e67 100644 --- a/tests/testcase/rtTestResultsTest.php +++ b/tests/testcase/rtTestResultsTest.php @@ -45,7 +45,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -73,7 +74,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -101,7 +103,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -129,7 +132,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -160,7 +164,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -189,7 +194,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -217,7 +223,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config);
diff --git a/src/testcase/rtPhpTest.php b/src/testcase/rtPhpTest.php index 7b40131..e3b5cfe 100644 --- a/src/testcase/rtPhpTest.php +++ b/src/testcase/rtPhpTest.php @@ -19,17 +19,19 @@ class rtPhpTest private $testName; private $contents; private $status; + private $testStatus; private $output; private $sections; private $fileSection; private $expectSection; private $sectionHeadings; - public function __construct(array $contents, $testName, $sectionHeadings, $runConfiguration) + public function __construct(array $contents, $testName, $sectionHeadings, $runConfiguration, $testStatus) { $this->contents = $contents; $this->testName = $testName; $this->sectionHeadings = $sectionHeadings; + $this->testStatus = $testStatus; $this->parse(); $this->init($runConfiguration); } diff --git a/src/testcase/rtTestStatus.php b/src/testcase/rtTestStatus.php new file mode 100644 index 0000000..e5b4693 --- /dev/null +++ b/src/testcase/rtTestStatus.php @@ -0,0 +1,17 @@ +<?php +/** + * rtTestStatus + * + * This class represents the status (PASS, FAIL etc) of a single test case. + * + * @category Testing + * @package RUNTESTS + * @author Zoe Slattery <zoe@php.net> + * @author Stefan Priebsch <spriebsch@php.net> + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * + */ +class rtTestStatus { +} +?> \ No newline at end of file diff --git a/tests/testcase/rtCleanExecutionTest.php b/tests/testcase/rtCleanExecutionTest.php index 634d5ac..3a79517 100644 --- a/tests/testcase/rtCleanExecutionTest.php +++ b/tests/testcase/rtCleanExecutionTest.php @@ -40,7 +40,8 @@ class rtCleanExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -66,7 +67,8 @@ class rtCleanExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtCookieExecutionTest.php b/tests/testcase/rtCookieExecutionTest.php index f5df417..611ffab 100644 --- a/tests/testcase/rtCookieExecutionTest.php +++ b/tests/testcase/rtCookieExecutionTest.php @@ -39,7 +39,8 @@ class rtCookieExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtDeflatePostExecutionTest.php b/tests/testcase/rtDeflatePostExecutionTest.php index 84dffb5..b9618b1 100644 --- a/tests/testcase/rtDeflatePostExecutionTest.php +++ b/tests/testcase/rtDeflatePostExecutionTest.php @@ -18,7 +18,7 @@ class rtDeflatePostExecutionTest extends PHPUnit_Framework_TestCase public function tearDown() { - @unlink($this->path-to_tests . '/sample_deflatepost.php'); + @unlink($this->path_to_tests . '/sample_deflatepost.php'); } public function testFileRun() @@ -37,7 +37,8 @@ class rtDeflatePostExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtExpectHeadersExecutionTest.php b/tests/testcase/rtExpectHeadersExecutionTest.php index 3506f30..9e1cd34 100644 --- a/tests/testcase/rtExpectHeadersExecutionTest.php +++ b/tests/testcase/rtExpectHeadersExecutionTest.php @@ -41,16 +41,17 @@ class rtExpectHeadersExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); $output = $testCase->getOutput(); - $status = $testCase->getStatus(); + $stat = $testCase->getStatus(); $headers = $testCase->getHeaders(); - $this->assertEquals('', $status['pass']); + $this->assertEquals('', $stat['pass']); } @@ -70,13 +71,14 @@ class rtExpectHeadersExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); - $status = $testCase->getStatus(); + $stat = $testCase->getStatus(); - $this->assertEquals('headers', $status['fail']); + $this->assertEquals('headers', $stat['fail']); } } diff --git a/tests/testcase/rtGetExecutionTest.php b/tests/testcase/rtGetExecutionTest.php index 5aee10c..5019f8d 100644 --- a/tests/testcase/rtGetExecutionTest.php +++ b/tests/testcase/rtGetExecutionTest.php @@ -39,7 +39,8 @@ class rtGetExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -68,7 +69,8 @@ class rtGetExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtGzipPostExecutionTest.php b/tests/testcase/rtGzipPostExecutionTest.php index d3c1d2e..9b749f6 100644 --- a/tests/testcase/rtGzipPostExecutionTest.php +++ b/tests/testcase/rtGzipPostExecutionTest.php @@ -37,7 +37,8 @@ class rtGzipPostExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtPhpTestTest.php b/tests/testcase/rtPhpTestTest.php index 5ad3011..31d27f0 100644 --- a/tests/testcase/rtPhpTestTest.php +++ b/tests/testcase/rtPhpTestTest.php @@ -27,7 +27,8 @@ class rtPhpTestTest extends PHPUnit_Framework_TestCase $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt')); $config->configure(); - $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config); + $status = new rtTestStatus(); + $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config, $status); $this->assertEquals('rtPhpTest', get_class($test)); } @@ -37,7 +38,8 @@ class rtPhpTestTest extends PHPUnit_Framework_TestCase $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt')); $config->configure(); - $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config); + $status = new rtTestStatus(); + $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config, $status); $this->assertEquals('rtTestHeaderSection', get_class($test->getSection('TEST'))); $this->assertEquals('rtFileSection', get_class($test->getSection('FILE'))); @@ -49,7 +51,8 @@ class rtPhpTestTest extends PHPUnit_Framework_TestCase $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt')); $config->configure(); - $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config); + $status = new rtTestStatus(); + $test = new rtPhpTest($this->testCase, 'nameOfTest', array('TEST', 'FILE', 'EXPECTF'), $config, $status); // var_dump($test->getSection('FILE')); diff --git a/tests/testcase/rtPostExecutionTest.php b/tests/testcase/rtPostExecutionTest.php index 656a617..c168d6e 100644 --- a/tests/testcase/rtPostExecutionTest.php +++ b/tests/testcase/rtPostExecutionTest.php @@ -37,7 +37,8 @@ class rtPostExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtPostRawExecutionTest.php b/tests/testcase/rtPostRawExecutionTest.php index 3ebe972..60d7edf 100644 --- a/tests/testcase/rtPostRawExecutionTest.php +++ b/tests/testcase/rtPostRawExecutionTest.php @@ -37,7 +37,8 @@ class rtPostRawExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtSkipIfExecutionTest.php b/tests/testcase/rtSkipIfExecutionTest.php index 337e269..2dda29a 100644 --- a/tests/testcase/rtSkipIfExecutionTest.php +++ b/tests/testcase/rtSkipIfExecutionTest.php @@ -34,7 +34,8 @@ class rtSkipIfExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtTestExecutionTest.php b/tests/testcase/rtTestExecutionTest.php index 4f180e4..11e5ba1 100644 --- a/tests/testcase/rtTestExecutionTest.php +++ b/tests/testcase/rtTestExecutionTest.php @@ -44,7 +44,8 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -68,7 +69,8 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -92,7 +94,8 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -119,7 +122,8 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -146,7 +150,8 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtTestOutputWriterTest.php b/tests/testcase/rtTestOutputWriterTest.php index e9e65ae..9d5045a 100644 --- a/tests/testcase/rtTestOutputWriterTest.php +++ b/tests/testcase/rtTestOutputWriterTest.php @@ -42,7 +42,8 @@ class rtTestOutputWriterTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); diff --git a/tests/testcase/rtTestResultsTest.php b/tests/testcase/rtTestResultsTest.php index 6ce5337..8b84e67 100644 --- a/tests/testcase/rtTestResultsTest.php +++ b/tests/testcase/rtTestResultsTest.php @@ -45,7 +45,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -73,7 +74,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -101,7 +103,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -129,7 +132,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -160,7 +164,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -189,7 +194,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -217,7 +223,8 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); + $status = new rtTestStatus(); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config, $status); //Setup and set the local environment for the test case $testCase->executeTest($config);