com phpruntests: fixed tests: tests/testcase/sections/configurationsections/rtArgsSectionTest.php
tests/testcase/sections/configurationsections/rtCookieSectionTest.php tests/testcase/sections/configurationsections/rtDeflatePostSect ionTest.php
tests/testcase/sections/configurationsections/r tEnvSectionTest.php tests/testcase/sections/configurationse ctions/rtGetSectionTest.php
tests/testcase/sections/configu rationsections/rtGzipPostSectionTest.php t
| From: | David Soria Parra | Date: | Sun, 17 May 2009 12:54:59 +0000 |
| Subject: | com phpruntests: fixed tests: tests/testcase/sections/configurationsections/rtArgsSectionTest.php tests/testcase/sections/configurationsections/rtCookieSectionTest.php tests/testcase/sections/configurationsections/rtDeflatePostSect ionTest.php tests/testcase/sections/configurationsections/r tEnvSectionTest.php tests/testcase/sections/configurationse ctions/rtGetSectionTest.php tests/testcase/sections/configu rationsections/rtGzipPostSectionTest.php t |
||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-66447@lists.php.net to get a copy of this message | ||
Commit: d9a13c6e20b7effa147b637cbd10c9b550cdd7aa
Author: Zoe Slattery <zoe@php.net> Sun, 17 May 2009 12:54:59 +0000
Parents: af9eb84a8877487aaf441123eef90376391a07e7
Branches: master
Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=d9a13c6e20b7effa147b637cbd10c9b550cdd7aa
Log:
fixed tests
Changed paths:
M tests/testcase/sections/configurationsections/rtArgsSectionTest.php
M tests/testcase/sections/configurationsections/rtCookieSectionTest.php
M tests/testcase/sections/configurationsections/rtDeflatePostSectionTest.php
M tests/testcase/sections/configurationsections/rtEnvSectionTest.php
M tests/testcase/sections/configurationsections/rtGetSectionTest.php
M tests/testcase/sections/configurationsections/rtGzipPostSectionTest..php
M tests/testcase/sections/configurationsections/rtIniSectionTest.php
M tests/testcase/sections/configurationsections/rtPostRawSectionTest.php
M tests/testcase/sections/configurationsections/rtPostSectionTest.php
M tests/testcase/sections/executablesections/rtCleanSectionTest..php
M tests/testcase/sections/executablesections/rtFileSectionTest.php
M tests/testcase/sections/executablesections/rtSkipIfSectionTest.php
M tests/testcase/sections/informationsections/rtCreditsSectionTest.php
M tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php
M tests/testcase/sections/informationsections/rtXfailSectionTest..php
diff --git a/tests/testcase/sections/configurationsections/rtArgsSectionTest.php b/tests/testcase/sections/configurationsections/rtArgsSectionTest.php index 90790e2..1a6c502 100644 --- a/tests/testcase/sections/configurationsections/rtArgsSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtArgsSectionTest.php @@ -7,7 +7,7 @@ class rtArgsSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $argsSection = new rtArgsSection('ARGS', array('-vvv -a value -1111 -2 -v')); + $argsSection = rtArgsSection::getInstance('ARGS', array('-vvv -a value -1111 -2 -v')); $arglist = $argsSection->getTestCommandLineArguments(); $this->assertEquals('-- -vvv -a value -1111 -2 -v', $arglist); diff --git a/tests/testcase/sections/configurationsections/rtCookieSectionTest.php b/tests/testcase/sections/configurationsections/rtCookieSectionTest.php index 9ded597..13e21ed 100644 --- a/tests/testcase/sections/configurationsections/rtCookieSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtCookieSectionTest.php @@ -6,7 +6,7 @@ class rtCookieSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $cookieSection = new rtCookieSection('COOKIE', array('hello=World&goodbye=MrChips')); + $cookieSection = rtCookieSection::getInstance('COOKIE', array('hello=World&goodbye=MrChips')); $envlist = $cookieSection->getCookieVariables(); $this->assertEquals('hello=World&goodbye=MrChips', $envlist['HTTP_COOKIE']); diff --git a/tests/testcase/sections/configurationsections/rtDeflatePostSectionTest.php b/tests/testcase/sections/configurationsections/rtDeflatePostSectionTest.php index 1677581..50e581c 100644 --- a/tests/testcase/sections/configurationsections/rtDeflatePostSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtDeflatePostSectionTest.php @@ -6,7 +6,7 @@ class rtDeflatePostSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $postSection = new rtDeflatePostSection('GZIP_POST', array('hello=World&goodbye=MrChips')); + $postSection = rtDeflatePostSection::getInstance('DEFLATE_POST', array('hello=World&goodbye=MrChips')); $envVars = $postSection->getPostVariables(); $this->assertEquals('POST', $envVars['REQUEST_METHOD']); diff --git a/tests/testcase/sections/configurationsections/rtEnvSectionTest.php b/tests/testcase/sections/configurationsections/rtEnvSectionTest.php index b0c3b99..607bcfb 100644 --- a/tests/testcase/sections/configurationsections/rtEnvSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtEnvSectionTest.php @@ -7,7 +7,7 @@ class rtEnvSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $envSection = new rtEnvSection('ENV', array('env1 = ENV1', 'env2=ENV2')); + $envSection = rtEnvSection::getInstance('ENV', array('env1 = ENV1', 'env2=ENV2')); $envlist = $envSection->getTestEnvironmentVariables(); $this->assertEquals('ENV1', $envlist['env1']); diff --git a/tests/testcase/sections/configurationsections/rtGetSectionTest.php b/tests/testcase/sections/configurationsections/rtGetSectionTest.php index 37ac4b1..7e5c1a7 100644 --- a/tests/testcase/sections/configurationsections/rtGetSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtGetSectionTest.php @@ -6,7 +6,7 @@ class rtGetSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $getSection = new rtGetSection('GET', array('hello=World&goodbye=MrChips')); + $getSection = rtGetSection::getInstance('GET', array('hello=World&goodbye=MrChips')); $envlist = $getSection->getGetVariables(); $this->assertEquals('hello=World&goodbye=MrChips', $envlist['QUERY_STRING']); diff --git a/tests/testcase/sections/configurationsections/rtGzipPostSectionTest.php b/tests/testcase/sections/configurationsections/rtGzipPostSectionTest.php index dbbe87b..f204c1e 100644 --- a/tests/testcase/sections/configurationsections/rtGzipPostSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtGzipPostSectionTest.php @@ -6,7 +6,7 @@ class rtGzipPostSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $postSection = new rtGzipPostSection('GZIP_POST', array('hello=World&goodbye=MrChips')); + $postSection = rtGzipPostSection::getInstance('GZIP_POST', array('hello=World&goodbye=MrChips')); $envVars = $postSection->getPostVariables(); $this->assertEquals('POST', $envVars['REQUEST_METHOD']); diff --git a/tests/testcase/sections/configurationsections/rtIniSectionTest.php b/tests/testcase/sections/configurationsections/rtIniSectionTest.php index dab304a..a5f8a14 100644 --- a/tests/testcase/sections/configurationsections/rtIniSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtIniSectionTest.php @@ -7,7 +7,7 @@ class rtIniSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $iniSection = new rtIniSection('INI', array('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 'assert.active = 1')); + $iniSection = rtIniSection::getInstance('INI', array('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 'assert.active = 1')); $inilist = $iniSection->getCommandLineArguments(); $this->assertEquals('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', $inilist[0]); diff --git a/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php b/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php index 50158f2..bbc781e 100644 --- a/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php @@ -12,7 +12,7 @@ class rtPostRawSectionTest extends PHPUnit_Framework_TestCase 'Content-Type:the second', 'mary', ); - $postSection = new rtPostRawSection('POST', $post_array); + $postSection = rtPostRawSection::getInstance('POST_RAW', $post_array); $envVars = $postSection->getPostVariables(); $this->assertEquals('POST', $envVars['REQUEST_METHOD']); diff --git a/tests/testcase/sections/configurationsections/rtPostSectionTest.php b/tests/testcase/sections/configurationsections/rtPostSectionTest.php index 2096f41..d7886ac 100644 --- a/tests/testcase/sections/configurationsections/rtPostSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtPostSectionTest.php @@ -6,7 +6,7 @@ class rtPostSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $postSection = new rtPostSection('POST', array('hello=World&goodbye=MrChips')); + $postSection = rtPostSection::getInstance('POST', array('hello=World&goodbye=MrChips')); $envVars = $postSection->getPostVariables(); $this->assertEquals('POST', $envVars['REQUEST_METHOD']); diff --git a/tests/testcase/sections/executablesections/rtCleanSectionTest.php b/tests/testcase/sections/executablesections/rtCleanSectionTest.php index 6e6eb1b..e22a954 100644 --- a/tests/testcase/sections/executablesections/rtCleanSectionTest.php +++ b/tests/testcase/sections/executablesections/rtCleanSectionTest.php @@ -7,7 +7,7 @@ class rtCleanSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $cleanSection = new rtCleanSection('CLEAN', array('<?php', 'echo "hello world";', '?>')); + $cleanSection = rtCleanSection::getInstance('CLEAN', array('<?php', 'echo "hello world";', '?>')); $code = $cleanSection->getContents(); $this->assertEquals('<?php', $code[0]); diff --git a/tests/testcase/sections/executablesections/rtFileSectionTest.php b/tests/testcase/sections/executablesections/rtFileSectionTest.php index 3a788c8..1315d14 100644 --- a/tests/testcase/sections/executablesections/rtFileSectionTest.php +++ b/tests/testcase/sections/executablesections/rtFileSectionTest.php @@ -7,14 +7,14 @@ class rtFileSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $fileSection = new rtFileSection('FILE', array('<?php', 'echo "hello world";', '?>')); + $fileSection = rtFileSection::getInstance('FILE', array('<?php', 'echo "hello world";', '?>')); $code = $fileSection->getContents(); $this->assertEquals('<?php', $code[0]); } public function testDone() { - $fileSection = new rtFileSection('FILE', array('<?php', 'echo "hello world";', '?>', '===DONE===', 'ignore-me')); + $fileSection = rtFileSection::getInstance('FILE', array('<?php', 'echo "hello world";', '?>', '===DONE===', 'ignore-me')); $code = $fileSection->getContents(); $last = count($code) - 1; @@ -23,7 +23,7 @@ class rtFileSectionTest extends PHPUnit_Framework_TestCase public function testDone2() { - $fileSection = new rtFileSection('FILE', array('<?php', 'echo "hello world";', '?>', '===DoNe===', 'ignore-me')); + $fileSection = rtFileSection::getInstance('FILE', array('<?php', 'echo "hello world";', '?>', '===DoNe===', 'ignore-me')); $code = $fileSection->getContents(); $last = count($code) - 1; diff --git a/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php b/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php index da3cb55..ee779ba 100644 --- a/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php +++ b/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php @@ -7,7 +7,7 @@ class rtSkipifSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $skipifSection = new rtSkipIfSection('SKIPIF', array('<?php', 'echo "hello world";', '?>')); + $skipifSection = rtSkipIfSection::getInstance('SKIPIF', array('<?php', 'echo "hello world";', '?>')); $code = $skipifSection->getContents(); $this->assertEquals('<?php', $code[0]); diff --git a/tests/testcase/sections/informationsections/rtCreditsSectionTest.php b/tests/testcase/sections/informationsections/rtCreditsSectionTest.php index dc6837f..d728090 100644 --- a/tests/testcase/sections/informationsections/rtCreditsSectionTest.php +++ b/tests/testcase/sections/informationsections/rtCreditsSectionTest.php @@ -7,7 +7,7 @@ class rtCreditsSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $creditsSection = new rtCreditsSection('CREDITS', array('Test from Fred', 'PHP London test fest')); + $creditsSection = rtCreditsSection::getInstance('CREDITS', array('Test from Fred', 'PHP London test fest')); $creditslist = $creditsSection->getContents(); $this->assertEquals('Test from Fred', $creditslist[0]); diff --git a/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php b/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php index a10881e..0e86fd8 100644 --- a/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php +++ b/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php @@ -7,7 +7,7 @@ class rtTestHeaderSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $headerSection = new rtTestHeaderSection('TEST', array('a test to test something')); + $headerSection = rtTestHeaderSection::getInstance('TEST', array('a test to test something')); $header = $headerSection->getHeader(); $this->assertEquals('a test to test something', $header); diff --git a/tests/testcase/sections/informationsections/rtXfailSectionTest.php b/tests/testcase/sections/informationsections/rtXfailSectionTest.php index ba5f2f0..0f74ab3 100644 --- a/tests/testcase/sections/informationsections/rtXfailSectionTest.php +++ b/tests/testcase/sections/informationsections/rtXfailSectionTest.php @@ -7,7 +7,7 @@ class rtXfailSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $xfailSection = new rtXfailSection('XFAIL', array('Bug number 12345')); + $xfailSection = rtXfailSection::getInstance('XFAIL', array('Bug number 12345')); $xfail = $xfailSection->getReason(); $this->assertEquals('Bug number 12345', $xfail);
diff --git a/tests/testcase/sections/configurationsections/rtArgsSectionTest.php b/tests/testcase/sections/configurationsections/rtArgsSectionTest.php index 90790e2..1a6c502 100644 --- a/tests/testcase/sections/configurationsections/rtArgsSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtArgsSectionTest.php @@ -7,7 +7,7 @@ class rtArgsSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $argsSection = new rtArgsSection('ARGS', array('-vvv -a value -1111 -2 -v')); + $argsSection = rtArgsSection::getInstance('ARGS', array('-vvv -a value -1111 -2 -v')); $arglist = $argsSection->getTestCommandLineArguments(); $this->assertEquals('-- -vvv -a value -1111 -2 -v', $arglist); diff --git a/tests/testcase/sections/configurationsections/rtCookieSectionTest.php b/tests/testcase/sections/configurationsections/rtCookieSectionTest.php index 9ded597..13e21ed 100644 --- a/tests/testcase/sections/configurationsections/rtCookieSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtCookieSectionTest.php @@ -6,7 +6,7 @@ class rtCookieSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $cookieSection = new rtCookieSection('COOKIE', array('hello=World&goodbye=MrChips')); + $cookieSection = rtCookieSection::getInstance('COOKIE', array('hello=World&goodbye=MrChips')); $envlist = $cookieSection->getCookieVariables(); $this->assertEquals('hello=World&goodbye=MrChips', $envlist['HTTP_COOKIE']); diff --git a/tests/testcase/sections/configurationsections/rtDeflatePostSectionTest.php b/tests/testcase/sections/configurationsections/rtDeflatePostSectionTest.php index 1677581..50e581c 100644 --- a/tests/testcase/sections/configurationsections/rtDeflatePostSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtDeflatePostSectionTest.php @@ -6,7 +6,7 @@ class rtDeflatePostSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $postSection = new rtDeflatePostSection('GZIP_POST', array('hello=World&goodbye=MrChips')); + $postSection = rtDeflatePostSection::getInstance('DEFLATE_POST', array('hello=World&goodbye=MrChips')); $envVars = $postSection->getPostVariables(); $this->assertEquals('POST', $envVars['REQUEST_METHOD']); diff --git a/tests/testcase/sections/configurationsections/rtEnvSectionTest.php b/tests/testcase/sections/configurationsections/rtEnvSectionTest.php index b0c3b99..607bcfb 100644 --- a/tests/testcase/sections/configurationsections/rtEnvSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtEnvSectionTest.php @@ -7,7 +7,7 @@ class rtEnvSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $envSection = new rtEnvSection('ENV', array('env1 = ENV1', 'env2=ENV2')); + $envSection = rtEnvSection::getInstance('ENV', array('env1 = ENV1', 'env2=ENV2')); $envlist = $envSection->getTestEnvironmentVariables(); $this->assertEquals('ENV1', $envlist['env1']); diff --git a/tests/testcase/sections/configurationsections/rtGetSectionTest.php b/tests/testcase/sections/configurationsections/rtGetSectionTest.php index 37ac4b1..7e5c1a7 100644 --- a/tests/testcase/sections/configurationsections/rtGetSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtGetSectionTest.php @@ -6,7 +6,7 @@ class rtGetSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $getSection = new rtGetSection('GET', array('hello=World&goodbye=MrChips')); + $getSection = rtGetSection::getInstance('GET', array('hello=World&goodbye=MrChips')); $envlist = $getSection->getGetVariables(); $this->assertEquals('hello=World&goodbye=MrChips', $envlist['QUERY_STRING']); diff --git a/tests/testcase/sections/configurationsections/rtGzipPostSectionTest.php b/tests/testcase/sections/configurationsections/rtGzipPostSectionTest.php index dbbe87b..f204c1e 100644 --- a/tests/testcase/sections/configurationsections/rtGzipPostSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtGzipPostSectionTest.php @@ -6,7 +6,7 @@ class rtGzipPostSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $postSection = new rtGzipPostSection('GZIP_POST', array('hello=World&goodbye=MrChips')); + $postSection = rtGzipPostSection::getInstance('GZIP_POST', array('hello=World&goodbye=MrChips')); $envVars = $postSection->getPostVariables(); $this->assertEquals('POST', $envVars['REQUEST_METHOD']); diff --git a/tests/testcase/sections/configurationsections/rtIniSectionTest.php b/tests/testcase/sections/configurationsections/rtIniSectionTest.php index dab304a..a5f8a14 100644 --- a/tests/testcase/sections/configurationsections/rtIniSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtIniSectionTest.php @@ -7,7 +7,7 @@ class rtIniSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $iniSection = new rtIniSection('INI', array('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 'assert.active = 1')); + $iniSection = rtIniSection::getInstance('INI', array('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 'assert.active = 1')); $inilist = $iniSection->getCommandLineArguments(); $this->assertEquals('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', $inilist[0]); diff --git a/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php b/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php index 50158f2..bbc781e 100644 --- a/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php @@ -12,7 +12,7 @@ class rtPostRawSectionTest extends PHPUnit_Framework_TestCase 'Content-Type:the second', 'mary', ); - $postSection = new rtPostRawSection('POST', $post_array); + $postSection = rtPostRawSection::getInstance('POST_RAW', $post_array); $envVars = $postSection->getPostVariables(); $this->assertEquals('POST', $envVars['REQUEST_METHOD']); diff --git a/tests/testcase/sections/configurationsections/rtPostSectionTest.php b/tests/testcase/sections/configurationsections/rtPostSectionTest.php index 2096f41..d7886ac 100644 --- a/tests/testcase/sections/configurationsections/rtPostSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtPostSectionTest.php @@ -6,7 +6,7 @@ class rtPostSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $postSection = new rtPostSection('POST', array('hello=World&goodbye=MrChips')); + $postSection = rtPostSection::getInstance('POST', array('hello=World&goodbye=MrChips')); $envVars = $postSection->getPostVariables(); $this->assertEquals('POST', $envVars['REQUEST_METHOD']); diff --git a/tests/testcase/sections/executablesections/rtCleanSectionTest.php b/tests/testcase/sections/executablesections/rtCleanSectionTest.php index 6e6eb1b..e22a954 100644 --- a/tests/testcase/sections/executablesections/rtCleanSectionTest.php +++ b/tests/testcase/sections/executablesections/rtCleanSectionTest.php @@ -7,7 +7,7 @@ class rtCleanSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $cleanSection = new rtCleanSection('CLEAN', array('<?php', 'echo "hello world";', '?>')); + $cleanSection = rtCleanSection::getInstance('CLEAN', array('<?php', 'echo "hello world";', '?>')); $code = $cleanSection->getContents(); $this->assertEquals('<?php', $code[0]); diff --git a/tests/testcase/sections/executablesections/rtFileSectionTest.php b/tests/testcase/sections/executablesections/rtFileSectionTest.php index 3a788c8..1315d14 100644 --- a/tests/testcase/sections/executablesections/rtFileSectionTest.php +++ b/tests/testcase/sections/executablesections/rtFileSectionTest.php @@ -7,14 +7,14 @@ class rtFileSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $fileSection = new rtFileSection('FILE', array('<?php', 'echo "hello world";', '?>')); + $fileSection = rtFileSection::getInstance('FILE', array('<?php', 'echo "hello world";', '?>')); $code = $fileSection->getContents(); $this->assertEquals('<?php', $code[0]); } public function testDone() { - $fileSection = new rtFileSection('FILE', array('<?php', 'echo "hello world";', '?>', '===DONE===', 'ignore-me')); + $fileSection = rtFileSection::getInstance('FILE', array('<?php', 'echo "hello world";', '?>', '===DONE===', 'ignore-me')); $code = $fileSection->getContents(); $last = count($code) - 1; @@ -23,7 +23,7 @@ class rtFileSectionTest extends PHPUnit_Framework_TestCase public function testDone2() { - $fileSection = new rtFileSection('FILE', array('<?php', 'echo "hello world";', '?>', '===DoNe===', 'ignore-me')); + $fileSection = rtFileSection::getInstance('FILE', array('<?php', 'echo "hello world";', '?>', '===DoNe===', 'ignore-me')); $code = $fileSection->getContents(); $last = count($code) - 1; diff --git a/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php b/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php index da3cb55..ee779ba 100644 --- a/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php +++ b/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php @@ -7,7 +7,7 @@ class rtSkipifSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $skipifSection = new rtSkipIfSection('SKIPIF', array('<?php', 'echo "hello world";', '?>')); + $skipifSection = rtSkipIfSection::getInstance('SKIPIF', array('<?php', 'echo "hello world";', '?>')); $code = $skipifSection->getContents(); $this->assertEquals('<?php', $code[0]); diff --git a/tests/testcase/sections/informationsections/rtCreditsSectionTest.php b/tests/testcase/sections/informationsections/rtCreditsSectionTest.php index dc6837f..d728090 100644 --- a/tests/testcase/sections/informationsections/rtCreditsSectionTest.php +++ b/tests/testcase/sections/informationsections/rtCreditsSectionTest.php @@ -7,7 +7,7 @@ class rtCreditsSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $creditsSection = new rtCreditsSection('CREDITS', array('Test from Fred', 'PHP London test fest')); + $creditsSection = rtCreditsSection::getInstance('CREDITS', array('Test from Fred', 'PHP London test fest')); $creditslist = $creditsSection->getContents(); $this->assertEquals('Test from Fred', $creditslist[0]); diff --git a/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php b/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php index a10881e..0e86fd8 100644 --- a/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php +++ b/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php @@ -7,7 +7,7 @@ class rtTestHeaderSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $headerSection = new rtTestHeaderSection('TEST', array('a test to test something')); + $headerSection = rtTestHeaderSection::getInstance('TEST', array('a test to test something')); $header = $headerSection->getHeader(); $this->assertEquals('a test to test something', $header); diff --git a/tests/testcase/sections/informationsections/rtXfailSectionTest.php b/tests/testcase/sections/informationsections/rtXfailSectionTest.php index ba5f2f0..0f74ab3 100644 --- a/tests/testcase/sections/informationsections/rtXfailSectionTest.php +++ b/tests/testcase/sections/informationsections/rtXfailSectionTest.php @@ -7,7 +7,7 @@ class rtXfailSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $xfailSection = new rtXfailSection('XFAIL', array('Bug number 12345')); + $xfailSection = rtXfailSection::getInstance('XFAIL', array('Bug number 12345')); $xfail = $xfailSection->getReason(); $this->assertEquals('Bug number 12345', $xfail);