com phpruntests: Change to the way POST section files are created: tests/testcase/rtTestConfigurationTest.php tests/testcase/rtTestDifferenceTest.php
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/secti

From: Date: Tue, 04 Aug 2009 21:47:03 +0000
Subject: com phpruntests: Change to the way POST section files are created: tests/testcase/rtTestConfigurationTest.php tests/testcase/rtTestDifferenceTest.php
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/secti
Groups: php.qa 
Request: Send a blank email to php-qa+get-66300@lists.php.net to get a copy of this message
Commit: a3d514e4bc7dcd79356231b6e833e46eba3ef189 Author: Zoe Slattery <zoe@php.net> Tue, 4 Aug 2009 21:47:03 +0000 Parents: 897e5bfd07356bbc67d93af4a1adb99625514a0c Branches: master Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=a3d514e4bc7dcd79356231b6e833e46eba3ef189 Log: Change to the way POST section files are created Changed paths: M tests/testcase/rtTestConfigurationTest.php M tests/testcase/rtTestDifferenceTest.php 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/rtFileExternalSectionTest.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 M tests/testcase/sections/outputsections/rtExpectFSectionTest.php M tests/testcase/sections/outputsections/rtExpectHeadersSectionTest.php M tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php M tests/testcase/sections/outputsections/rtExpectSectionTest.php M tests/testcase/sections/rtSectionTest.php

diff --git a/tests/testcase/rtTestConfigurationTest.php b/tests/testcase/rtTestConfigurationTest.php index c99ff06..024bf9d 100644 --- a/tests/testcase/rtTestConfigurationTest.php +++ b/tests/testcase/rtTestConfigurationTest.php @@ -11,10 +11,10 @@ class rtTestConfigurationTest extends PHPUnit_Framework_TestCase { $this->php = $this->php = trim(shell_exec("which php")); - $this->sections['ARGS'] = rtArgsSection::getInstance('ARGS', array('-vvv -a value -1111 -2 -v')); - $this->sections['ENV'] = rtEnvSection::getInstance('ENV', array('env1 = ENV1', 'env2=ENV2')); - $this->sections['INI'] = rtIniSection::getInstance('INI', array('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 'assert.active = 1')); - $this->sections['FILE'] = rtFileSection::getInstance('FILE', array('blah')); + $this->sections['ARGS'] = rtArgsSection::getInstance('ARGS', array('-vvv -a value -1111 -2 -v'), 'testname'); + $this->sections['ENV'] = rtEnvSection::getInstance('ENV', array('env1 = ENV1', 'env2=ENV2'), 'testname'); + $this->sections['INI'] = rtIniSection::getInstance('INI', array('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 'assert.active = 1'), 'testname'); + $this->sections['FILE'] = rtFileSection::getInstance('FILE', array('blah'), 'testname'); } diff --git a/tests/testcase/rtTestDifferenceTest.php b/tests/testcase/rtTestDifferenceTest.php index 458d076..9dc34f2 100644 --- a/tests/testcase/rtTestDifferenceTest.php +++ b/tests/testcase/rtTestDifferenceTest.php @@ -7,7 +7,7 @@ class rtTestDifferenceTest extends PHPUnit_Framework_TestCase { public function testTestDifference() { - $expectSection = rtExpectSection::getInstance('EXPECT', array('Hello World')); + $expectSection = rtExpectSection::getInstance('EXPECT', array('Hello World'), 'testname'); $testDifference = new rtTestDifference($expectSection, 'Hello Dolly'); $difference = $testDifference->getDifference(); diff --git a/tests/testcase/sections/configurationsections/rtArgsSectionTest.php b/tests/testcase/sections/configurationsections/rtArgsSectionTest.php index 1a6c502..ddf329a 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 = rtArgsSection::getInstance('ARGS', array('-vvv -a value -1111 -2 -v')); + $argsSection = rtArgsSection::getInstance('ARGS', array('-vvv -a value -1111 -2 -v'), 'testname'); $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 13e21ed..b6b9c6d 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 = rtCookieSection::getInstance('COOKIE', array('hello=World&goodbye=MrChips')); + $cookieSection = rtCookieSection::getInstance('COOKIE', array('hello=World&goodbye=MrChips'), 'testname'); $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 50e581c..d65735d 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 = rtDeflatePostSection::getInstance('DEFLATE_POST', array('hello=World&goodbye=MrChips')); + $postSection = rtDeflatePostSection::getInstance('DEFLATE_POST', array('hello=World&goodbye=MrChips'), 'testname'); $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 d21452c..4a7ba90 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 = rtEnvSection::getInstance('ENV', array('env1 = ENV1', 'env2=ENV2')); + $envSection = rtEnvSection::getInstance('ENV', array('env1 = ENV1', 'env2=ENV2'), 'testname'); $envlist = $envSection->getTestEnvironmentVariables(); $this->assertEquals('ENV1', $envlist['env1']); @@ -16,7 +16,7 @@ class rtEnvSectionTest extends PHPUnit_Framework_TestCase public function testCreateInstance2() { - $envSection = rtEnvSection::getInstance('ENV', array('env1 = ENV1=env')); + $envSection = rtEnvSection::getInstance('ENV', array('env1 = ENV1=env'), 'testname'); $envlist = $envSection->getTestEnvironmentVariables(); $this->assertEquals('ENV1=env', $envlist['env1']); diff --git a/tests/testcase/sections/configurationsections/rtGetSectionTest.php b/tests/testcase/sections/configurationsections/rtGetSectionTest.php index 7e5c1a7..b162841 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 = rtGetSection::getInstance('GET', array('hello=World&goodbye=MrChips')); + $getSection = rtGetSection::getInstance('GET', array('hello=World&goodbye=MrChips'), 'testname'); $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 f204c1e..8e6d7ce 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 = rtGzipPostSection::getInstance('GZIP_POST', array('hello=World&goodbye=MrChips')); + $postSection = rtGzipPostSection::getInstance('GZIP_POST', array('hello=World&goodbye=MrChips'), 'testname'); $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 a7cea42..0123d29 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 = rtIniSection::getInstance('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'), 'testname'); $iniSection->substitutePWD('a-file-name'); $inilist = $iniSection->getCommandLineArguments(); @@ -16,7 +16,7 @@ class rtIniSectionTest extends PHPUnit_Framework_TestCase } public function testSubtitutePWD() { - $iniSection = rtIniSection::getInstance('INI', array('include_path={PWD}')); + $iniSection = rtIniSection::getInstance('INI', array('include_path={PWD}'), 'testname'); $afile = __FILE__; $iniSection->substitutePWD($afile); $inilist = $iniSection->getCommandLineArguments(); diff --git a/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php b/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php index bbc781e..12a36bf 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 = rtPostRawSection::getInstance('POST_RAW', $post_array); + $postSection = rtPostRawSection::getInstance('POST_RAW', $post_array, 'testname'); $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 d7886ac..8fb46cf 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 = rtPostSection::getInstance('POST', array('hello=World&goodbye=MrChips')); + $postSection = rtPostSection::getInstance('POST', array('hello=World&goodbye=MrChips'), 'testname'); $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 e22a954..14ca3f8 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 = rtCleanSection::getInstance('CLEAN', array('<?php', 'echo "hello world";', '?>')); + $cleanSection = rtCleanSection::getInstance('CLEAN', array('<?php', 'echo "hello world";', '?>'), 'testname'); $code = $cleanSection->getContents(); $this->assertEquals('<?php', $code[0]); diff --git a/tests/testcase/sections/executablesections/rtFileExternalSectionTest.php b/tests/testcase/sections/executablesections/rtFileExternalSectionTest.php index 8b22317..7b9d571 100644 --- a/tests/testcase/sections/executablesections/rtFileExternalSectionTest.php +++ b/tests/testcase/sections/executablesections/rtFileExternalSectionTest.php @@ -7,7 +7,7 @@ class rtFileExternalSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $fileSection = rtFileExternalSection::getInstance('FILE_EXTERNAL', array('<?php', 'echo "hello world";', '?>')); + $fileSection = rtFileExternalSection::getInstance('FILE_EXTERNAL', array('<?php', 'echo "hello world";', '?>'), 'testname'); $code = $fileSection->getContents(); $this->assertEquals('<?php', $code[0]); diff --git a/tests/testcase/sections/executablesections/rtFileSectionTest.php b/tests/testcase/sections/executablesections/rtFileSectionTest.php index 1a03da9..8dc8ab6 100644 --- a/tests/testcase/sections/executablesections/rtFileSectionTest.php +++ b/tests/testcase/sections/executablesections/rtFileSectionTest.php @@ -7,7 +7,7 @@ class rtFileSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $fileSection = rtFileSection::getInstance('FILE', array('<?php', 'echo "hello world";', '?>')); + $fileSection = rtFileSection::getInstance('FILE', array('<?php', 'echo "hello world";', '?>'), 'testname'); $code = $fileSection->getContents(); $this->assertEquals('<?php', $code[0]); diff --git a/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php b/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php index ee779ba..13794b1 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 = rtSkipIfSection::getInstance('SKIPIF', array('<?php', 'echo "hello world";', '?>')); + $skipifSection = rtSkipIfSection::getInstance('SKIPIF', array('<?php', 'echo "hello world";', '?>'), 'testname'); $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 d728090..e13e57f 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 = rtCreditsSection::getInstance('CREDITS', array('Test from Fred', 'PHP London test fest')); + $creditsSection = rtCreditsSection::getInstance('CREDITS', array('Test from Fred', 'PHP London test fest'), 'testname'); $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 0e86fd8..360d6d2 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 = rtTestHeaderSection::getInstance('TEST', array('a test to test something')); + $headerSection = rtTestHeaderSection::getInstance('TEST', array('a test to test something'), 'testname'); $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 0f74ab3..6af96f8 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 = rtXfailSection::getInstance('XFAIL', array('Bug number 12345')); + $xfailSection = rtXfailSection::getInstance('XFAIL', array('Bug number 12345'), 'testname'); $xfail = $xfailSection->getReason(); $this->assertEquals('Bug number 12345', $xfail); diff --git a/tests/testcase/sections/outputsections/rtExpectFSectionTest.php b/tests/testcase/sections/outputsections/rtExpectFSectionTest.php index 99b8822..5b569e2 100644 --- a/tests/testcase/sections/outputsections/rtExpectFSectionTest.php +++ b/tests/testcase/sections/outputsections/rtExpectFSectionTest.php @@ -7,7 +7,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase { public function testCreatePattern() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello World')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello World'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals('Hello World', $pattern); @@ -15,7 +15,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testPercentE() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %e')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %e'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals("Hello \\/", $pattern); @@ -23,7 +23,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testPercentS() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %s')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %s'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals('Hello [^\r\n]+', $pattern); @@ -31,7 +31,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testPercentA() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %a')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %a'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals('Hello .+', $pattern); @@ -39,7 +39,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testPercentW() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %w')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %w'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals('Hello \s*', $pattern); @@ -47,7 +47,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testPercentI() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %i')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %i'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals('Hello [+-]?\d+', $pattern); @@ -55,7 +55,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testPercentD() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %d')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %d'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals('Hello \d+', $pattern); @@ -63,7 +63,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testPercentX() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %x')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %x'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals('Hello [0-9a-fA-F]+', $pattern); @@ -71,7 +71,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testPercentF() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %f')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %f'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals('Hello [+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', $pattern); @@ -79,7 +79,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testPercentR() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('%unicode|string%(18) "%r\0%rMyClass%r\0%rpri_value%r\0%r"')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('%unicode|string%(18) "%r\0%rMyClass%r\0%rpri_value%r\0%r"'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals('string\(18\) "(\0)MyClass(\0)pri_value(\0)"', $pattern); @@ -87,7 +87,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testPercentC() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %c')); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %c'), 'testname'); $pattern = $expectFSection->getPattern(); $this->assertEquals('Hello .', $pattern); @@ -95,7 +95,7 @@ class rtExpectFSectionTest extends PHPUnit_Framework_TestCase public function testCompare() { - $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %s') ); + $expectFSection = rtExpectFSection::getInstance('EXPECTF', array('Hello %s'), 'testname' ); $result = $expectFSection->compare('Hello World'); $this->assertTrue($result); diff --git a/tests/testcase/sections/outputsections/rtExpectHeadersSectionTest.php b/tests/testcase/sections/outputsections/rtExpectHeadersSectionTest.php index 8686bb1..8d7ad1a 100644 --- a/tests/testcase/sections/outputsections/rtExpectHeadersSectionTest.php +++ b/tests/testcase/sections/outputsections/rtExpectHeadersSectionTest.php @@ -6,7 +6,7 @@ require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; class rtExpectHeadersSectionTest extends PHPUnit_Framework_TestCase { public function testCreatePattern() { - $expectSection = rtExpectHeadersSection::getInstance('EXPECTHEADERS', array('abc:def', 'ghi:jkl')); + $expectSection = rtExpectHeadersSection::getInstance('EXPECTHEADERS', array('abc:def', 'ghi:jkl'), 'testname'); $pattern = $expectSection->getPattern(); $this->assertEquals('def', $pattern['abc']); @@ -14,7 +14,7 @@ class rtExpectHeadersSectionTest extends PHPUnit_Framework_TestCase } public function testCreatePattern2() { - $expectSection = rtExpectHeadersSection::getInstance('EXPECTHEADERS', array("abc:def\r\n", "ghi:jkl:fred")); + $expectSection = rtExpectHeadersSection::getInstance('EXPECTHEADERS', array("abc:def\r\n", "ghi:jkl:fred"), 'testname'); $pattern = $expectSection->getPattern(); $this->assertEquals('def', $pattern['abc']); @@ -22,14 +22,14 @@ class rtExpectHeadersSectionTest extends PHPUnit_Framework_TestCase } public function testCompare() { - $expectSection = rtExpectHeadersSection::getInstance('EXPECTHEADERS', array("abc:def\r\n", "ghi:jkl:fred")); + $expectSection = rtExpectHeadersSection::getInstance('EXPECTHEADERS', array("abc:def\r\n", "ghi:jkl:fred"), 'testname'); $test = $expectSection->compare("ghi:jkl:fred\nabc: def"); $this->assertTrue($test); } public function testCompare2() { - $expectSection = rtExpectHeadersSection::getInstance('EXPECTHEADERS', array("abc:def\r\n", "ghi:jkl:fred")); + $expectSection = rtExpectHeadersSection::getInstance('EXPECTHEADERS', array("abc:def\r\n", "ghi:jkl:fred"), 'testname'); $test = $expectSection->compare("ghi:jkl\r\nabcd: def\r\n"); $this->assertFalse($test); diff --git a/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php b/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php index aa2e47e..3ec9c92 100644 --- a/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php +++ b/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php @@ -7,7 +7,7 @@ class rtExpectRegexSectionTest extends PHPUnit_Framework_TestCase { public function testCreateObject() { - $expectRegexSection = rtExpectRegexSection::getInstance('EXPECTREGEX', array('Hello \w{5}')); + $expectRegexSection = rtExpectRegexSection::getInstance('EXPECTREGEX', array('Hello \w{5}'), 'testname'); $pattern = $expectRegexSection->getPattern(); $this->assertEquals("Hello \w{5}", $pattern); @@ -15,7 +15,7 @@ class rtExpectRegexSectionTest extends PHPUnit_Framework_TestCase public function testCompare() { - $expectRegexSection = rtExpectRegexSection::getInstance('EXPECTREGEX', array('Hello \w{5}')); + $expectRegexSection = rtExpectRegexSection::getInstance('EXPECTREGEX', array('Hello \w{5}'), 'testname'); $result = $expectRegexSection->compare('Hello World'); $this->assertTrue($result); diff --git a/tests/testcase/sections/outputsections/rtExpectSectionTest.php b/tests/testcase/sections/outputsections/rtExpectSectionTest.php index 5242f8a..d0639c4 100644 --- a/tests/testcase/sections/outputsections/rtExpectSectionTest.php +++ b/tests/testcase/sections/outputsections/rtExpectSectionTest.php @@ -6,7 +6,7 @@ require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; class rtExpectSectionTest extends PHPUnit_Framework_TestCase { public function testCreatePattern() { - $expectSection = rtExpectSection::getInstance('EXPECT', array('Hello World')); + $expectSection = rtExpectSection::getInstance('EXPECT', array('Hello World'), 'testname'); $pattern = $expectSection->getPattern(); $this->assertEquals('Hello World', $pattern); @@ -15,7 +15,7 @@ class rtExpectSectionTest extends PHPUnit_Framework_TestCase public function testCreateTwolinePattern() { - $expectSection = rtExpectSection::getInstance('EXPECT', array('Hello World', 'Hello again')); + $expectSection = rtExpectSection::getInstance('EXPECT', array('Hello World', 'Hello again'), 'testname'); $pattern = $expectSection->getPattern(); $this->assertEquals("Hello World\nHello again", $pattern); @@ -23,7 +23,7 @@ class rtExpectSectionTest extends PHPUnit_Framework_TestCase public function testCreateTwolinePatternWithr() { - $expectSection = rtExpectSection::getInstance('EXPECT', array("Hello World\r", 'Hello again')); + $expectSection = rtExpectSection::getInstance('EXPECT', array("Hello World\r", 'Hello again'), 'testname'); $pattern = $expectSection->getPattern(); $this->assertEquals("Hello World\nHello again", $pattern); @@ -31,7 +31,7 @@ class rtExpectSectionTest extends PHPUnit_Framework_TestCase public function testCompare() { - $expectSection = rtExpectSection::getInstance('EXPECT', array('Hello World') ); + $expectSection = rtExpectSection::getInstance('EXPECT', array('Hello World'), 'testname' ); $result = $expectSection->compare('Hello World'); $this->assertTrue($result); diff --git a/tests/testcase/sections/rtSectionTest.php b/tests/testcase/sections/rtSectionTest.php index b2c0648..c88046c 100644 --- a/tests/testcase/sections/rtSectionTest.php +++ b/tests/testcase/sections/rtSectionTest.php @@ -7,7 +7,7 @@ class rtSectionTest extends PHPUnit_Framework_TestCase { public function testGetInstance() { - $expectFSection = rtSection::getInstance('EXPECTF', array('Hello World')); + $expectFSection = rtSection::getInstance('EXPECTF', array('Hello World'), 'testname'); $this->assertEquals('rtExpectFSection', get_class($expectFSection)); } @@ -16,7 +16,7 @@ class rtSectionTest extends PHPUnit_Framework_TestCase */ public function testGetInstanceThrowsExceptionOnUnknownSection() { - rtSection::getInstance('NONSENSE', array()); + rtSection::getInstance('NONSENSE', array(), 'testname'); } } ?>
« previous php.qa (#66300) next »