spriebsch Fri Apr 24 09:42:02 2009 UTC Modified files: /phpruntests/tests rtTextTest.php /phpruntests/tests/configuration rtDirectoryListTest.php rtEnvironmentVariablesTest.php rtPreconditionListTest.php rtRuntestsConfigurationTest.php /phpruntests/tests/configuration/preconditions rtIsExecutableSetTest.php rtIsTestFileSpecifiedTest.php /phpruntests/tests/configuration/settings rtPhpExecutableSettingTest.php rtTestFileSettingTest.php /phpruntests/tests/testcase rtCleanExecutionTest.php rtPhpRunnerTest.php rtPhpTestFileTest.php rtTestConfigurationTest.php rtTestDifferenceTest.php rtTestExecutionTest.php rtTestOutputWriterTest.php rtTestResultsTest.php /phpruntests/tests/testcase/preconditions rtHasMandatorySectionsTest.php rtHasNoDuplicateSectionTest.php rtIsSectionImplementedTest.php rtIsValidSectionNameTest.php /phpruntests/tests/testcase/sections rtSectionTest.php /phpruntests/tests/testcase/sections/configurationsections rtArgsSectionTest.php rtEnvSectionTest.php rtIniSectionTest.php /phpruntests/tests/testcase/sections/executablesections rtCleanSectionTest.php rtFileSectionTest.php rtSkipIfSectionTest.php /phpruntests/tests/testcase/sections/informationsections rtCreditsSectionTest.php rtTestHeaderSectionTest.php rtXfailSectionTest.php /phpruntests/tests/testcase/sections/outputsections rtExpectFSectionTest.php rtExpectRegexSectionTest.php rtExpectSectionTest.php Log: Reformatted to conform to PEAR coding standard.
http://cvs.php.net/viewvc.cgi/phpruntests/tests/rtTextTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/rtTextTest.php diff -u phpruntests/tests/rtTextTest.php:1.1.1.1 phpruntests/tests/rtTextTest.php:1.2 --- phpruntests/tests/rtTextTest.php:1.1.1.1 Wed Apr 15 16:30:20 2009 +++ phpruntests/tests/rtTextTest.php Fri Apr 24 09:42:01 2009 @@ -1,13 +1,14 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '/../src/rtAutoload.php'; - class rtHelpTextTest extends PHPUnit_Framework_TestCase { - public function testOutput() { - $words = rtText::get('help'); - $this->assertEquals(substr($words, 0, 9), 'Synopsis:'); - } + public function testOutput() + { + $words = rtText::get('help'); + $this->assertEquals(substr($words, 0, 9), 'Synopsis:'); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/rtDirectoryListTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/rtDirectoryListTest.php diff -u phpruntests/tests/configuration/rtDirectoryListTest.php:1.2 phpruntests/tests/configuration/rtDirectoryListTest.php:1.3 --- phpruntests/tests/configuration/rtDirectoryListTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/rtDirectoryListTest.php Fri Apr 24 09:42:01 2009 @@ -8,24 +8,24 @@ public function setUp() { $tmpDir = sys_get_temp_dir(). "/top"; - mkdir ($tmpDir); - mkdir ($tmpDir. "/a"); - mkdir ($tmpDir. "/b"); - mkdir ($tmpDir. "/c"); + mkdir($tmpDir); + mkdir($tmpDir. "/a"); + mkdir($tmpDir. "/b"); + mkdir($tmpDir. "/c"); file_put_contents($tmpDir. "/c/afile", "hello"); - mkdir ($tmpDir. "/c/d"); + mkdir($tmpDir. "/c/d"); } public function tearDown() { $tmpDir = sys_get_temp_dir(). "/top"; - rmdir ($tmpDir. "/a"); - rmdir ($tmpDir. "/b"); + rmdir($tmpDir. "/a"); + rmdir($tmpDir. "/b"); - unlink ($tmpDir. "/c/afile"); - rmdir ($tmpDir. "/c/d"); - rmdir ($tmpDir. "/c"); - rmdir ($tmpDir); + unlink($tmpDir. "/c/afile"); + rmdir($tmpDir. "/c/d"); + rmdir($tmpDir. "/c"); + rmdir($tmpDir); } public function testNames() http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/rtEnvironmentVariablesTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/rtEnvironmentVariablesTest.php diff -u phpruntests/tests/configuration/rtEnvironmentVariablesTest.php:1.2 phpruntests/tests/configuration/rtEnvironmentVariablesTest.php:1.3 --- phpruntests/tests/configuration/rtEnvironmentVariablesTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/rtEnvironmentVariablesTest.php Fri Apr 24 09:42:01 2009 @@ -50,7 +50,7 @@ $ev->adaptEnvironment(); $ev->getUserSuppliedVariables(); - $this->assertEquals('some-windows-thing', $ev->getVariable('SystemRoot')); + $this->assertEquals('some-windows-thing', $ev->getVariable('SystemRoot')); } } ?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/rtPreconditionListTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/rtPreconditionListTest.php diff -u phpruntests/tests/configuration/rtPreconditionListTest.php:1.2 phpruntests/tests/configuration/rtPreconditionListTest.php:1.3 --- phpruntests/tests/configuration/rtPreconditionListTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/rtPreconditionListTest.php Fri Apr 24 09:42:01 2009 @@ -11,11 +11,11 @@ public function setUp() { - $this->clo = new rtCommandLineOptions(); - $this->clo->parse(array('run-tests.php', '-p', 'some-php-exe', 'a-test.phpt')); - - $this->env = rtEnvironmentVariables::getInstance(); - $this->env->getUserSuppliedVariables(); + $this->clo = new rtCommandLineOptions(); + $this->clo->parse(array('run-tests.php', '-p', 'some-php-exe', 'a-test.phpt')); + + $this->env = rtEnvironmentVariables::getInstance(); + $this->env->getUserSuppliedVariables(); } public function testCheck() http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/rtRuntestsConfigurationTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/rtRuntestsConfigurationTest.php diff -u phpruntests/tests/configuration/rtRuntestsConfigurationTest.php:1.2 phpruntests/tests/configuration/rtRuntestsConfigurationTest.php:1.3 --- phpruntests/tests/configuration/rtRuntestsConfigurationTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/rtRuntestsConfigurationTest.php Fri Apr 24 09:42:01 2009 @@ -18,7 +18,7 @@ public function testCreateWin() { - $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', 'a-php-exe', 'test.phpt'),'Windows'); + $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', 'a-php-exe', 'test.phpt'), 'Windows'); $config->configure(); $testFiles = $config->getSetting('TestFiles'); http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIsExecutableSetTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIsExecutableSetTest.php diff -u phpruntests/tests/configuration/preconditions/rtIsExecutableSetTest.php:1.2 phpruntests/tests/configuration/preconditions/rtIsExecutableSetTest.php:1.3 --- phpruntests/tests/configuration/preconditions/rtIsExecutableSetTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/preconditions/rtIsExecutableSetTest.php Fri Apr 24 09:42:01 2009 @@ -24,7 +24,7 @@ $pre = new rtIsExecutableSet(); - $this->assertTrue($pre->check($clo,$env)); + $this->assertTrue($pre->check($clo, $env)); } public function testGetText() http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php diff -u phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php:1.2 phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php:1.3 --- phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php Fri Apr 24 09:42:01 2009 @@ -16,7 +16,7 @@ $this->assertTrue($pre->check($clo, $env)); } - public function testCLOptionL( + public function testCLOptionL() { $env = rtEnvironmentVariables::getInstance(); $clo = new rtCommandLineOptions(); http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php diff -u phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php:1.2 phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php:1.3 --- phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php Fri Apr 24 09:42:01 2009 @@ -11,7 +11,7 @@ $clisetting = new rtPhpExecutableSetting($configuration); - $this->assertEquals('a-php-executable', $clisetting->get()); + $this->assertEquals('a-php-executable', $clisetting->get()); } public function testSetPhpExecutableEV() @@ -21,7 +21,7 @@ $clisetting = new rtPhpExecutableSetting($configuration); - $this->assertEquals('a-php-executable', $clisetting->get()); + $this->assertEquals('a-php-executable', $clisetting->get()); } public function testSetPhpExecutableEVAuto() http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/settings/rtTestFileSettingTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/settings/rtTestFileSettingTest.php diff -u phpruntests/tests/configuration/settings/rtTestFileSettingTest.php:1.2 phpruntests/tests/configuration/settings/rtTestFileSettingTest.php:1.3 --- phpruntests/tests/configuration/settings/rtTestFileSettingTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/settings/rtTestFileSettingTest.php Fri Apr 24 09:42:01 2009 @@ -18,7 +18,7 @@ $this->f1 = sys_get_temp_dir() . "/file1"; $fh = fopen($this->f1, 'w'); - foreach($this->testnames as $line) { + foreach ($this->testnames as $line) { fwrite($fh, sys_get_temp_dir() . $line . "\n"); } http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtCleanExecutionTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/testcase/rtCleanExecutionTest.php diff -u phpruntests/tests/testcase/rtCleanExecutionTest.php:1.2 phpruntests/tests/testcase/rtCleanExecutionTest.php:1.3 --- phpruntests/tests/testcase/rtCleanExecutionTest.php:1.2 Wed Apr 22 09:14:51 2009 +++ phpruntests/tests/testcase/rtCleanExecutionTest.php Fri Apr 24 09:42:01 2009 @@ -66,7 +66,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(),$testFile->getSectionHeadings(), $config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtPhpRunnerTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/testcase/rtPhpRunnerTest.php diff -u phpruntests/tests/testcase/rtPhpRunnerTest.php:1.2 phpruntests/tests/testcase/rtPhpRunnerTest.php:1.3 --- phpruntests/tests/testcase/rtPhpRunnerTest.php:1.2 Wed Apr 22 09:14:51 2009 +++ phpruntests/tests/testcase/rtPhpRunnerTest.php Fri Apr 24 09:42:01 2009 @@ -33,9 +33,9 @@ public function testStdin() { - $PhpRunner = new rtPhpRunner($this->php .' -n /tmp/test2.php 2>&1', array(), '/tmp', 'hello'); + $PhpRunner = new rtPhpRunner($this->php .' -n /tmp/test2.php 2>&1', array(), '/tmp', 'hello'); - $this->assertEquals("hello", $PhpRunner->runphp()); + $this->assertEquals("hello", $PhpRunner->runphp()); } } http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtPhpTestFileTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/testcase/rtPhpTestFileTest.php diff -u phpruntests/tests/testcase/rtPhpTestFileTest.php:1.2 phpruntests/tests/testcase/rtPhpTestFileTest.php:1.3 --- phpruntests/tests/testcase/rtPhpTestFileTest.php:1.2 Wed Apr 22 09:14:51 2009 +++ phpruntests/tests/testcase/rtPhpTestFileTest.php Fri Apr 24 09:42:01 2009 @@ -46,7 +46,7 @@ //..and that they have been successfully removed $this->assertEquals(preg_match("/\r\n/", $fileString), 0); - } + } public function testLinuxLineEndings() { @@ -63,7 +63,7 @@ //..and that they have been successfully removed $this->assertEquals(preg_match("/\n/", $fileString), 0); - } + } public function testPreconditionCall() { @@ -72,6 +72,6 @@ $testFile->normaliseLineEndings(); $this->assertTrue($testFile->arePreConditionsMet()); - } - } + } +} ?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtTestConfigurationTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/testcase/rtTestConfigurationTest.php diff -u phpruntests/tests/testcase/rtTestConfigurationTest.php:1.2 phpruntests/tests/testcase/rtTestConfigurationTest.php:1.3 --- phpruntests/tests/testcase/rtTestConfigurationTest.php:1.2 Wed Apr 22 09:14:51 2009 +++ phpruntests/tests/testcase/rtTestConfigurationTest.php Fri Apr 24 09:42:01 2009 @@ -9,9 +9,9 @@ public function setUp() { - $this->sections['ARGS'] = new rtArgsSection('ARGS',array('-vvv -a value -1111 -2 -v')); - $this->sections['ENV'] = new rtEnvSection('ENV',array('env1 = ENV1', 'env2=ENV2')); - $this->sections['INI'] = new rtIniSection('INI',array('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 'assert.active = 1')); + $this->sections['ARGS'] = new rtArgsSection('ARGS', array('-vvv -a value -1111 -2 -v')); + $this->sections['ENV'] = new rtEnvSection('ENV', array('env1 = ENV1', 'env2=ENV2')); + $this->sections['INI'] = new rtIniSection('INI', array('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 'assert.active = 1')); } public function testCreateInstance() @@ -55,7 +55,7 @@ $testConfiguration = new rtTestConfiguration($config, $this->sections); $phpargs = $testConfiguration->getPhpCommandLineArguments(); - $match = preg_match("/-d \"error_reporting=E_ALL | E_STRICT | E_DEPRECATED\" -d \"assert.active=1\"/",$phpargs); + $match = preg_match("/-d \"error_reporting=E_ALL | E_STRICT | E_DEPRECATED\" -d \"assert.active=1\"/", $phpargs); $this->assertEquals(1, $match); } http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtTestDifferenceTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/testcase/rtTestDifferenceTest.php diff -u phpruntests/tests/testcase/rtTestDifferenceTest.php:1.2 phpruntests/tests/testcase/rtTestDifferenceTest.php:1.3 --- phpruntests/tests/testcase/rtTestDifferenceTest.php:1.2 Wed Apr 22 09:14:51 2009 +++ phpruntests/tests/testcase/rtTestDifferenceTest.php Fri Apr 24 09:42:01 2009 @@ -7,10 +7,11 @@ { public function testTestDifference() { - $expectSection = new rtExpectSection('EXPECT',array('Hello World')); + $expectSection = new rtExpectSection('EXPECT', array('Hello World')); $testDifference = new rtTestDifference($expectSection, 'Hello Dolly'); $difference = $testDifference->getDifference(); + $this->assertEquals('001+ Hello Dolly', $difference[0]); $this->assertEquals('001- Hello World', $difference[1]); } http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtTestExecutionTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/testcase/rtTestExecutionTest.php diff -u phpruntests/tests/testcase/rtTestExecutionTest.php:1.2 phpruntests/tests/testcase/rtTestExecutionTest.php:1.3 --- phpruntests/tests/testcase/rtTestExecutionTest.php:1.2 Wed Apr 22 09:14:51 2009 +++ phpruntests/tests/testcase/rtTestExecutionTest.php Fri Apr 24 09:42:01 2009 @@ -42,7 +42,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(),$config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -66,7 +66,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(),$config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -93,7 +93,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(),$testFile->getSectionHeadings(), $config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -120,7 +120,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(),$testFile->getSectionHeadings(), $config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtTestOutputWriterTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/testcase/rtTestOutputWriterTest.php diff -u phpruntests/tests/testcase/rtTestOutputWriterTest.php:1.2 phpruntests/tests/testcase/rtTestOutputWriterTest.php:1.3 --- phpruntests/tests/testcase/rtTestOutputWriterTest.php:1.2 Wed Apr 22 09:14:51 2009 +++ phpruntests/tests/testcase/rtTestOutputWriterTest.php Fri Apr 24 09:42:02 2009 @@ -42,7 +42,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(),$config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtTestResultsTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/testcase/rtTestResultsTest.php diff -u phpruntests/tests/testcase/rtTestResultsTest.php:1.2 phpruntests/tests/testcase/rtTestResultsTest.php:1.3 --- phpruntests/tests/testcase/rtTestResultsTest.php:1.2 Wed Apr 22 09:14:51 2009 +++ phpruntests/tests/testcase/rtTestResultsTest.php Fri Apr 24 09:42:02 2009 @@ -45,7 +45,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(),$testFile->getSectionHeadings(), $config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -73,7 +73,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(),$testFile->getSectionHeadings(), $config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -101,7 +101,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(),$testFile->getSectionHeadings(), $config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -129,7 +129,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(),$config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -160,7 +160,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(),$config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -189,7 +189,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(),$config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -217,7 +217,7 @@ $testFile->normaliseLineEndings(); //Create a new test case - $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(),$config); + $testCase = new rtPhpTest($testFile->getContents(), $testFile->getTestName(), $testFile->getSectionHeadings(), $config); //Setup and set the local environment for the test case $testCase->executeTest($config); @@ -244,7 +244,7 @@ $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); - if(!$testFile->arePreConditionsMet()) { + if (!$testFile->arePreConditionsMet()) { $results = new rtTestResults(null, "borked", $testFiles[0]); http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/preconditions/rtHasMandatorySectionsTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/preconditions/rtHasMandatorySectionsTest.php diff -u phpruntests/tests/testcase/preconditions/rtHasMandatorySectionsTest.php:1.1.1.1 phpruntests/tests/testcase/preconditions/rtHasMandatorySectionsTest.php:1.2 --- phpruntests/tests/testcase/preconditions/rtHasMandatorySectionsTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/preconditions/rtHasMandatorySectionsTest.php Fri Apr 24 09:42:02 2009 @@ -1,21 +1,23 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../src/rtAutoload.php'; +class rtHasMandatorySectionsTest extends PHPUnit_Framework_TestCase +{ + public function testHas() + { + $precondition = new rtHasMandatorySections(); + $test = array('TEST','FILE', 'EXPECT'); + $this->assertTrue($precondition->isMet($test)); + } -class rtHasMandatorySectionsTest extends PHPUnit_Framework_TestCase { - - public function testHas() { - $precondition = new rtHasMandatorySections(); - $test = array('TEST','FILE', 'EXPECT'); - $this->assertTrue($precondition->isMet($test)); - } - - public function testHasNot() { - $precondition = new rtHasMandatorySections(); - $test = array('TEST', 'FILE'); - $this->assertEquals("The test case is missing one or more mandatory sections.", trim($precondition->getMessage())); - $this->assertFalse($precondition->isMet($test)); - } + public function testHasNot() + { + $precondition = new rtHasMandatorySections(); + $test = array('TEST', 'FILE'); + $this->assertEquals("The test case is missing one or more mandatory sections.", trim($precondition->getMessage())); + $this->assertFalse($precondition->isMet($test)); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/preconditions/rtHasNoDuplicateSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/preconditions/rtHasNoDuplicateSectionTest.php diff -u phpruntests/tests/testcase/preconditions/rtHasNoDuplicateSectionTest.php:1.1.1.1 phpruntests/tests/testcase/preconditions/rtHasNoDuplicateSectionTest.php:1.2 --- phpruntests/tests/testcase/preconditions/rtHasNoDuplicateSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/preconditions/rtHasNoDuplicateSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,24 +1,25 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../src/rtAutoload.php'; - -class rtHasNoDuplicateSectionTest extends PHPUnit_Framework_TestCase { - - public function testNoDup() { - $precondition = new rtHasNoDuplicateSections(); - $test = array('TEST', 'FILE'); - - $this->assertTrue($precondition->isMet($test)); - } - - public function testDup() { - $precondition = new rtHasNoDuplicateSections(); - $test = array('TEST', 'TEST'); - $this->assertEquals("The test has duplicate sections.", trim($precondition->getMessage())); - $this->assertFalse($precondition->isMet($test)); - } - - +class rtHasNoDuplicateSectionTest extends PHPUnit_Framework_TestCase +{ + public function testNoDup() + { + $precondition = new rtHasNoDuplicateSections(); + $test = array('TEST', 'FILE'); + + $this->assertTrue($precondition->isMet($test)); + } + + public function testDup() + { + $precondition = new rtHasNoDuplicateSections(); + $test = array('TEST', 'TEST'); + + $this->assertEquals("The test has duplicate sections.", trim($precondition->getMessage())); + $this->assertFalse($precondition->isMet($test)); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/preconditions/rtIsSectionImplementedTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/preconditions/rtIsSectionImplementedTest.php diff -u phpruntests/tests/testcase/preconditions/rtIsSectionImplementedTest.php:1.1.1.1 phpruntests/tests/testcase/preconditions/rtIsSectionImplementedTest.php:1.2 --- phpruntests/tests/testcase/preconditions/rtIsSectionImplementedTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/preconditions/rtIsSectionImplementedTest.php Fri Apr 24 09:42:02 2009 @@ -1,21 +1,25 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../src/rtAutoload.php'; +class rtIsSectionImplementedTest extends PHPUnit_Framework_TestCase +{ + public function testIs() + { + $precondition = new rtIsSectionImplemented(); + $test = array('TEST', 'FILE', 'EXPECT'); -class rtIsSectionImplementedTest extends PHPUnit_Framework_TestCase { + $this->assertTrue($precondition->isMet($test)); + } - public function testIs() { - $precondition = new rtIsSectionImplemented(); - $test = array('TEST', 'FILE', 'EXPECT'); - $this->assertTrue($precondition->isMet($test)); - } + public function testIsNot() + { + $precondition = new rtIsSectionImplemented(); + $test = array('UEXPECT', 'FILE'); - public function testIsNot() { - $precondition = new rtIsSectionImplemented(); - $test = array('UEXPECT', 'FILE'); - $this->assertEquals("The test contains a section which is not implemented yet", trim($precondition->getMessage())); - $this->assertFalse($precondition->isMet($test)); - } + $this->assertEquals("The test contains a section which is not implemented yet", trim($precondition->getMessage())); + $this->assertFalse($precondition->isMet($test)); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/preconditions/rtIsValidSectionNameTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/preconditions/rtIsValidSectionNameTest.php diff -u phpruntests/tests/testcase/preconditions/rtIsValidSectionNameTest.php:1.1.1.1 phpruntests/tests/testcase/preconditions/rtIsValidSectionNameTest.php:1.2 --- phpruntests/tests/testcase/preconditions/rtIsValidSectionNameTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/preconditions/rtIsValidSectionNameTest.php Fri Apr 24 09:42:02 2009 @@ -1,22 +1,26 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../src/rtAutoload.php'; - class rtIsValidSectionNameTest extends PHPUnit_Framework_TestCase { - public function testValid() { - $precondition = new rtIsValidSectionName(); - $test = array('TEST', 'FILE'); - $this->assertTrue($precondition->isMet($test)); - } - public function testInvalid() { - $precondition = new rtIsValidSectionName(); - $test = array('TEXT', 'FILE'); - $this->assertEquals("Test case contains an invalid section.", trim($precondition->getMessage())); - $this->assertFalse($precondition->isMet($test)); - } + public function testValid() + { + $precondition = new rtIsValidSectionName(); + $test = array('TEST', 'FILE'); + + $this->assertTrue($precondition->isMet($test)); + } + + public function testInvalid() + { + $precondition = new rtIsValidSectionName(); + $test = array('TEXT', 'FILE'); + $this->assertEquals("Test case contains an invalid section.", trim($precondition->getMessage())); + $this->assertFalse($precondition->isMet($test)); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/rtSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/rtSectionTest.php diff -u phpruntests/tests/testcase/sections/rtSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/rtSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/rtSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/rtSectionTest.php Fri Apr 24 09:42:02 2009 @@ -5,16 +5,18 @@ class rtSectionTest extends PHPUnit_Framework_TestCase { - public function testGetInstance() { - $expectFSection = rtSection::getInstance('EXPECTF', array('Hello World')); - $this->assertEquals('rtExpectFSection', get_class($expectFSection)); - } + public function testGetInstance() + { + $expectFSection = rtSection::getInstance('EXPECTF', array('Hello World')); + $this->assertEquals('rtExpectFSection', get_class($expectFSection)); + } - /** - * @expectedException RuntimeException - */ - public function testGetInstanceThrowsExceptionOnUnknownSection() { - rtSection::getInstance('NONSENSE', array()); - } + /** + * @expectedException RuntimeException + */ + public function testGetInstanceThrowsExceptionOnUnknownSection() + { + rtSection::getInstance('NONSENSE', array()); + } } ?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/configurationsections/rtArgsSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/configurationsections/rtArgsSectionTest.php diff -u phpruntests/tests/testcase/sections/configurationsections/rtArgsSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/configurationsections/rtArgsSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/configurationsections/rtArgsSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/configurationsections/rtArgsSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,17 +1,16 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtArgsSectionTest extends PHPUnit_Framework_TestCase - { -public function testCreateInstance() { - $argsSection = new rtArgsSection('ARGS',array('-vvv -a value -1111 -2 -v')); - $arglist = $argsSection->getTestCommandLineArguments(); - $this->assertEquals('-- -vvv -a value -1111 -2 -v', $arglist); - } - + public function testCreateInstance() + { + $argsSection = new rtArgsSection('ARGS', array('-vvv -a value -1111 -2 -v')); + $arglist = $argsSection->getTestCommandLineArguments(); + $this->assertEquals('-- -vvv -a value -1111 -2 -v', $arglist); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/configurationsections/rtEnvSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/configurationsections/rtEnvSectionTest.php diff -u phpruntests/tests/testcase/sections/configurationsections/rtEnvSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/configurationsections/rtEnvSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/configurationsections/rtEnvSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/configurationsections/rtEnvSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,18 +1,17 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtEnvSectionTest extends PHPUnit_Framework_TestCase - { -public function testCreateInstance() { - $envSection = new rtEnvSection('ENV',array('env1 = ENV1', 'env2=ENV2')); - $envlist = $envSection->getTestEnvironmentVariables(); - $this->assertEquals('ENV1', $envlist['env1']); - $this->assertEquals('ENV2', $envlist['env2']); - } - + public function testCreateInstance() + { + $envSection = new rtEnvSection('ENV', array('env1 = ENV1', 'env2=ENV2')); + $envlist = $envSection->getTestEnvironmentVariables(); + $this->assertEquals('ENV1', $envlist['env1']); + $this->assertEquals('ENV2', $envlist['env2']); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/configurationsections/rtIniSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/configurationsections/rtIniSectionTest.php diff -u phpruntests/tests/testcase/sections/configurationsections/rtIniSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/configurationsections/rtIniSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/configurationsections/rtIniSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/configurationsections/rtIniSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,18 +1,17 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - 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')); - $inilist = $iniSection->getCommandLineArguments(); - $this->assertEquals('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', $inilist[0]); - $this->assertEquals('assert.active = 1', $inilist[1]); - } + public function testCreateInstance() + { + $iniSection = new rtIniSection('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]); + $this->assertEquals('assert.active = 1', $inilist[1]); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/executablesections/rtCleanSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/executablesections/rtCleanSectionTest.php diff -u phpruntests/tests/testcase/sections/executablesections/rtCleanSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/executablesections/rtCleanSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/executablesections/rtCleanSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/executablesections/rtCleanSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,17 +1,16 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtCleanSectionTest extends PHPUnit_Framework_TestCase - { -public function testCreateInstance() { - $cleanSection = new rtCleanSection('CLEAN',array('<?php', 'echo "hello world";', '?>')); - $code = $cleanSection->getContents(); - $this->assertEquals('<?php', $code[0]); - } - - + public function testCreateInstance() + { + $cleanSection = new rtCleanSection('CLEAN', array('<?php', 'echo "hello world";', '?>')); + $code = $cleanSection->getContents(); + + $this->assertEquals('<?php', $code[0]); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/executablesections/rtFileSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/executablesections/rtFileSectionTest.php diff -u phpruntests/tests/testcase/sections/executablesections/rtFileSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/executablesections/rtFileSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/executablesections/rtFileSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/executablesections/rtFileSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,17 +1,16 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtSkipIfSectionTest extends PHPUnit_Framework_TestCase - { -public function testCreateInstance() { - $skipifSection = new rtSkipIfSection('SKIPIF',array('<?php', 'echo "hello world";', '?>')); - $code = $skipifSection->getContents(); - $this->assertEquals('<?php', $code[0]); - } - + public function testCreateInstance() + { + $skipifSection = new rtSkipIfSection('SKIPIF', array('<?php', 'echo "hello world";', '?>')); + $code = $skipifSection->getContents(); + $this->assertEquals('<?php', $code[0]); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php diff -u phpruntests/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,17 +1,16 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtFileSectionTest extends PHPUnit_Framework_TestCase - { -public function testCreateInstance() { - $fileSection = new rtFileSection('FILE',array('<?php', 'echo "hello world";', '?>')); - $code = $fileSection->getContents(); - $this->assertEquals('<?php', $code[0]); - } - + public function testCreateInstance() + { + $fileSection = new rtFileSection('FILE', array('<?php', 'echo "hello world";', '?>')); + $code = $fileSection->getContents(); + $this->assertEquals('<?php', $code[0]); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/informationsections/rtCreditsSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/informationsections/rtCreditsSectionTest.php diff -u phpruntests/tests/testcase/sections/informationsections/rtCreditsSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/informationsections/rtCreditsSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/informationsections/rtCreditsSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/informationsections/rtCreditsSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,19 +1,17 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtCreditsSectionTest extends PHPUnit_Framework_TestCase { - -public function testCreateInstance() { - - $creditsSection = new rtCreditsSection('CREDITS',array('Test from Fred', 'PHP London test fest')); - $creditslist = $creditsSection->getContents(); - $this->assertEquals('Test from Fred', $creditslist[0]); - $this->assertEquals('PHP London test fest', $creditslist[1]); - - } + public function testCreateInstance() + { + $creditsSection = new rtCreditsSection('CREDITS', array('Test from Fred', 'PHP London test fest')); + $creditslist = $creditsSection->getContents(); + $this->assertEquals('Test from Fred', $creditslist[0]); + $this->assertEquals('PHP London test fest', $creditslist[1]); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php diff -u phpruntests/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,18 +1,16 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtTestHeaderSectionTest extends PHPUnit_Framework_TestCase { - -public function testCreateInstance() { - - $headerSection = new rtTestHeaderSection('TEST',array('a test to test something')); - $header = $headerSection->getHeader(); - $this->assertEquals('a test to test something', $header); - - } + public function testCreateInstance() + { + $headerSection = new rtTestHeaderSection('TEST', array('a test to test something')); + $header = $headerSection->getHeader(); + $this->assertEquals('a test to test something', $header); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/informationsections/rtXfailSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/informationsections/rtXfailSectionTest.php diff -u phpruntests/tests/testcase/sections/informationsections/rtXfailSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/informationsections/rtXfailSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/informationsections/rtXfailSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/informationsections/rtXfailSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,17 +1,16 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtXfailSectionTest extends PHPUnit_Framework_TestCase { - -public function testCreateInstance() { - - $xfailSection = new rtXfailSection('XFAIL',array('Bug number 12345')); - $xfail = $xfailSection->getReason(); - $this->assertEquals('Bug number 12345', $xfail); - - } + public function testCreateInstance() + { + $xfailSection = new rtXfailSection('XFAIL', array('Bug number 12345')); + $xfail = $xfailSection->getReason(); + + $this->assertEquals('Bug number 12345', $xfail); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/outputsections/rtExpectFSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/outputsections/rtExpectFSectionTest.php diff -u phpruntests/tests/testcase/sections/outputsections/rtExpectFSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/outputsections/rtExpectFSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/outputsections/rtExpectFSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/outputsections/rtExpectFSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,83 +1,96 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtExpectFSectionTest extends PHPUnit_Framework_TestCase { - public function testCreatePattern() { - $expectFSection = new rtExpectFSection('EXPECTF', array('Hello World')); - $pattern = $expectFSection->getPattern(); - $this->assertEquals('Hello World', $pattern); - } - - public function testPercentE() { - $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %e')); - $pattern = $expectFSection->getPattern(); - $this->assertEquals("Hello \\/", $pattern); - } - - public function testPercentS() { - $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %s')); - $pattern = $expectFSection->getPattern(); - $this->assertEquals('Hello [^\r\n]+', $pattern); - } - - - - public function testPercentA() { - $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %a')); - $pattern = $expectFSection->getPattern(); - $this->assertEquals('Hello .+', $pattern); - } - - - public function testPercentW() { - $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %w')); - $pattern = $expectFSection->getPattern(); - $this->assertEquals('Hello \s*', $pattern); - } - - - public function testPercentI() { - $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %i')); - $pattern = $expectFSection->getPattern(); - $this->assertEquals('Hello [+-]?\d+', $pattern); - } - - - public function testPercentD() { - $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %d')); - $pattern = $expectFSection->getPattern(); - $this->assertEquals('Hello \d+', $pattern); - } - - - public function testPercentX() { - $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %x')); - $pattern = $expectFSection->getPattern(); - $this->assertEquals('Hello [0-9a-fA-F]+', $pattern); - } - - - public function testPercentF() { - $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %f')); - $pattern = $expectFSection->getPattern(); - $this->assertEquals('Hello [+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', $pattern); - } - - - public function testPercentC() { - $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %c')); - $pattern = $expectFSection->getPattern(); - $this->assertEquals('Hello .', $pattern); - } - - public function testCompare() { - $expectFSection = new rtExpectFSection('EXPECTF',array('Hello %s') ); - $result = $expectFSection->compare('Hello World'); - $this->assertTrue($result); - } + public function testCreatePattern() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello World')); + $pattern = $expectFSection->getPattern(); + + $this->assertEquals('Hello World', $pattern); + } + + public function testPercentE() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %e')); + $pattern = $expectFSection->getPattern(); + + $this->assertEquals("Hello \\/", $pattern); + } + + public function testPercentS() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %s')); + $pattern = $expectFSection->getPattern(); + + $this->assertEquals('Hello [^\r\n]+', $pattern); + } + + public function testPercentA() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %a')); + $pattern = $expectFSection->getPattern(); + + $this->assertEquals('Hello .+', $pattern); + } + + public function testPercentW() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %w')); + $pattern = $expectFSection->getPattern(); + + $this->assertEquals('Hello \s*', $pattern); + } + + public function testPercentI() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %i')); + $pattern = $expectFSection->getPattern(); + + $this->assertEquals('Hello [+-]?\d+', $pattern); + } + + public function testPercentD() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %d')); + $pattern = $expectFSection->getPattern(); + + $this->assertEquals('Hello \d+', $pattern); + } + + public function testPercentX() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %x')); + $pattern = $expectFSection->getPattern(); + + $this->assertEquals('Hello [0-9a-fA-F]+', $pattern); + } + + public function testPercentF() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %f')); + $pattern = $expectFSection->getPattern(); + + $this->assertEquals('Hello [+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', $pattern); + } + + public function testPercentC() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %c')); + $pattern = $expectFSection->getPattern(); + + $this->assertEquals('Hello .', $pattern); + } + + public function testCompare() + { + $expectFSection = new rtExpectFSection('EXPECTF', array('Hello %s') ); + $result = $expectFSection->compare('Hello World'); + $this->assertTrue($result); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php diff -u phpruntests/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,21 +1,24 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtExpectRegexSectionTest extends PHPUnit_Framework_TestCase { - public function testCreateObject() { - $expectRegexSection = new rtExpectRegexSection('EXPECTREGEX',array('Hello \w{5}') ); - $pattern = $expectRegexSection->getPattern(); - $this->assertEquals("Hello \w{5}", $pattern); - } - - public function testCompare() { - $expectRegexSection = new rtExpectRegexSection('EXPECTREGEX',array('Hello \w{5}') ); - $result = $expectRegexSection->compare('Hello World'); - $this->assertTrue($result); - } + public function testCreateObject() + { + $expectRegexSection = new rtExpectRegexSection('EXPECTREGEX', array('Hello \w{5}')); + $pattern = $expectRegexSection->getPattern(); + + $this->assertEquals("Hello \w{5}", $pattern); + } + + public function testCompare() + { + $expectRegexSection = new rtExpectRegexSection('EXPECTREGEX', array('Hello \w{5}')); + $result = $expectRegexSection->compare('Hello World'); + $this->assertTrue($result); + } } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/sections/outputsections/rtExpectSectionTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/sections/outputsections/rtExpectSectionTest.php diff -u phpruntests/tests/testcase/sections/outputsections/rtExpectSectionTest.php:1.1.1.1 phpruntests/tests/testcase/sections/outputsections/rtExpectSectionTest.php:1.2 --- phpruntests/tests/testcase/sections/outputsections/rtExpectSectionTest.php:1.1.1.1 Wed Apr 15 16:30:21 2009 +++ phpruntests/tests/testcase/sections/outputsections/rtExpectSectionTest.php Fri Apr 24 09:42:02 2009 @@ -1,35 +1,40 @@ <?php + require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../../src/rtAutoload.php'; - class rtExpectSectionTest extends PHPUnit_Framework_TestCase { -public function testCreatePattern() { - $expectSection = new rtExpectSection('EXPECT',array('Hello World')); - $pattern = $expectSection->getPattern(); - $this->assertEquals('Hello World', $pattern); - } - - - public function testCreateTwolinePattern() { - $expectSection = new rtExpectSection('EXPECT',array('Hello World', 'Hello again')); - - $pattern = $expectSection->getPattern(); - $this->assertEquals("Hello World\nHello again", $pattern); - } - - public function testCreateTwolinePatternWithr() { - $expectSection = new rtExpectSection('EXPECT',array("Hello World\r", 'Hello again')); - $pattern = $expectSection->getPattern(); - $this->assertEquals("Hello World\nHello again", $pattern); - } - - public function testCompare() { - $expectSection = new rtExpectSection('EXPECT',array('Hello World') ); - $result = $expectSection->compare('Hello World'); - $this->assertTrue($result); - } + public function testCreatePattern() { + $expectSection = new rtExpectSection('EXPECT', array('Hello World')); + $pattern = $expectSection->getPattern(); + + $this->assertEquals('Hello World', $pattern); + } + + + public function testCreateTwolinePattern() + { + $expectSection = new rtExpectSection('EXPECT', array('Hello World', 'Hello again')); + $pattern = $expectSection->getPattern(); + + $this->assertEquals("Hello World\nHello again", $pattern); + } + + public function testCreateTwolinePatternWithr() + { + $expectSection = new rtExpectSection('EXPECT', array("Hello World\r", 'Hello again')); + $pattern = $expectSection->getPattern(); + + $this->assertEquals("Hello World\nHello again", $pattern); + } + + public function testCompare() + { + $expectSection = new rtExpectSection('EXPECT', array('Hello World') ); + $result = $expectSection->compare('Hello World'); + $this->assertTrue($result); + } } -?> \ No newline at end of file +?>
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php