[PHP-CVS] svn: /php/phpruntests/trunk/tests/testcase/sections/configurationsections/ rtPostSectionTest.php

2012-05-09 Thread Zoe Slattery
zoe  Wed, 09 May 2012 16:54:16 +

Revision: http://svn.php.net/viewvc?view=revision&revision=325630

Log:
clean up temporary file

Changed paths:
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtPostSectionTest.php

Modified: 
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtPostSectionTest.php
===
--- 
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtPostSectionTest.php
   2012-05-09 16:29:30 UTC (rev 325629)
+++ 
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtPostSectionTest.php
   2012-05-09 16:54:16 UTC (rev 325630)
@@ -13,6 +13,9 @@
 $fileName = $postSection->getPostFileName();
 $string = file_get_contents($fileName);

+//clean up
+unlink($fileName);
+
 $this->assertEquals('hello=World&goodbye=MrChips', $string);
 }
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/phpruntests/trunk/tests/testcase/ rtTestConfigurationTest.php rtTestDifferenceTest.php sections/configurationsections/rtArgsSectionTest.php sections/configurationsections/rtCookieS

2009-08-04 Thread Zoe Slattery
zoe  Tue, 04 Aug 2009 21:47:03 +

Revision: http://svn.php.net/viewvc?view=revision&revision=286821

Log:
Change to the way POST section files are created

Changed paths:
U   php/phpruntests/trunk/tests/testcase/rtTestConfigurationTest.php
U   php/phpruntests/trunk/tests/testcase/rtTestDifferenceTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtArgsSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtCookieSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtDeflatePostSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtEnvSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtGetSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtGzipPostSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtIniSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtPostRawSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtPostSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/executablesections/rtCleanSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/executablesections/rtFileExternalSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/executablesections/rtFileSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/executablesections/rtSkipIfSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/informationsections/rtCreditsSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/informationsections/rtTestHeaderSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/informationsections/rtXfailSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/outputsections/rtExpectFSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/outputsections/rtExpectHeadersSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/outputsections/rtExpectRegexSectionTest.php
U   
php/phpruntests/trunk/tests/testcase/sections/outputsections/rtExpectSectionTest.php
U   php/phpruntests/trunk/tests/testcase/sections/rtSectionTest.php

Modified: php/phpruntests/trunk/tests/testcase/rtTestConfigurationTest.php
===
--- php/phpruntests/trunk/tests/testcase/rtTestConfigurationTest.php	2009-08-04 21:46:19 UTC (rev 286820)
+++ php/phpruntests/trunk/tests/testcase/rtTestConfigurationTest.php	2009-08-04 21:47:03 UTC (rev 286821)
@@ -11,10 +11,10 @@
 {
 $this->php = $this->php = trim(shell_exec("which php"));

-$this->sections['ARGS'] = rtArgsSection::getInstance('ARGS', array('-vvv -a value - -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 - -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');

 }


Modified: php/phpruntests/trunk/tests/testcase/rtTestDifferenceTest.php
===
--- php/phpruntests/trunk/tests/testcase/rtTestDifferenceTest.php	2009-08-04 21:46:19 UTC (rev 286820)
+++ php/phpruntests/trunk/tests/testcase/rtTestDifferenceTest.php	2009-08-04 21:47:03 UTC (rev 286821)
@@ -7,7 +7,7 @@
 {
 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();

Modified: php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtArgsSectionTest.php
===
--- php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtArgsSectionTest.php	2009-08-04 21:46:19 UTC (rev 286820)
+++ php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtArgsSectionTest.php	2009-08-04 21:47:03 UTC (rev 286821)
@@ -7,7 +7,7 @@
 {

[PHP-CVS] svn: php/phpruntests/trunk/tests/testcase/sections/configurationsections/ rtIniSectionTest.php

2009-07-16 Thread Zoe Slattery
zoe Thu, 16 Jul 2009 16:02:44 +

URL: http://svn.php.net/viewvc?view=revision&revision=284193

Changed paths:
U   
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtIniSectionTest.php

Log:
fixing {PWD} in INI sections

Modified: 
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtIniSectionTest.php
===
--- 
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtIniSectionTest.php
2009-07-16 16:01:01 UTC (rev 284192)
+++ 
php/phpruntests/trunk/tests/testcase/sections/configurationsections/rtIniSectionTest.php
2009-07-16 16:02:44 UTC (rev 284193)
@@ -7,11 +7,21 @@
 {
 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'));
+$iniSection->substitutePWD('a-file-name');
 $inilist = $iniSection->getCommandLineArguments();

 $this->assertEquals('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 
$inilist[0]);
 $this->assertEquals('assert.active = 1', $inilist[1]);
 }
+public function testSubtitutePWD()
+{
+$iniSection = rtIniSection::getInstance('INI', 
array('include_path={PWD}'));
+$afile = __FILE__;
+$iniSection->substitutePWD($afile);
+$inilist = $iniSection->getCommandLineArguments();
+
+$this->assertEquals('include_path=' . dirname($afile), $inilist[0]);
+}
 }
 ?>

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: php/phpruntests/trunk/tests/testcase/

2009-07-15 Thread Zoe Slattery
zoe Wed, 15 Jul 2009 16:58:10 +

URL: http://svn.php.net/viewvc?view=revision&revision=284133

Changed paths:
U   php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php

Log:
another fix

Modified: php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php
===
--- php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php 2009-07-15 
16:52:50 UTC (rev 284132)
+++ php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php 2009-07-15 
16:58:10 UTC (rev 284133)
@@ -82,8 +82,9 @@
 $status = $testCase->getStatus();


-$setPhp = $configuration->getSetting('TEST_PHP_EXECUTABLE');
+$setPhp = $config->getSetting('PhpExecutable');

+
 if   (preg_match("/sapi/", $setPhp)) {
 // Make no assertion bacuse the CGI executable can be guesed
 } else {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: php/phpruntests/trunk/tests/testcase/

2009-07-15 Thread Zoe Slattery
zoe Wed, 15 Jul 2009 15:24:01 +

URL: http://svn.php.net/viewvc?view=revision&revision=284128

Changed paths:
U   php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php

Log:
fixing for Georg

Modified: php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php
===
--- php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php 2009-07-15 
15:19:52 UTC (rev 284127)
+++ php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php 2009-07-15 
15:24:01 UTC (rev 284128)
@@ -49,7 +49,7 @@
 $status = $testCase->getStatus();

 $this->assertEquals('85', strlen($output));
-  $this->assertFalse($testCase->getStatus()->getValue('fail'));
+$this->assertFalse($testCase->getStatus()->getValue('fail'));


 }
@@ -78,15 +78,22 @@
 $testCase->executeTest($config);
 $output = $testCase->getOutput();
 //var_dump($output);
-
+
 $status = $testCase->getStatus();
-

-$this->assertEquals(0, strlen($output));
-$this->assertTrue($testCase->getStatus()->getValue('skip'));
-$this->assertEquals('The CGI executable is unavailable', 
$testCase->getStatus()->getMessage('skip'));
+
+$setPhp = $configuration->getSetting('TEST_PHP_EXECUTABLE');

+if   (preg_match("/sapi/", $setPhp)) {
+// Make no assertion bacuse the CGI executable can be guesed
+} else {
+$this->assertEquals(0, strlen($output));
+$this->assertTrue($testCase->getStatus()->getValue('skip'));
+$this->assertEquals('The CGI executable is unavailable', 
$testCase->getStatus()->getMessage('skip'));
+}

+
+
 }
 }
 ?>

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: php/phpruntests/trunk/tests/testcase/

2009-07-15 Thread Zoe Slattery
zoe Wed, 15 Jul 2009 10:35:41 +

URL: http://svn.php.net/viewvc?view=revision&revision=284112

Changed paths:
U   php/phpruntests/trunk/tests/testcase/rtCleanExecutionTest.php
U   php/phpruntests/trunk/tests/testcase/rtCookieExecutionTest.php
U   php/phpruntests/trunk/tests/testcase/rtDeflatePostExecutionTest.php
U   
php/phpruntests/trunk/tests/testcase/rtExpectHeadersExecutionTest.php
U   php/phpruntests/trunk/tests/testcase/rtFileExternalExecutionTest.php
U   php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php
U   php/phpruntests/trunk/tests/testcase/rtGzipPostExecutionTest.php
U   php/phpruntests/trunk/tests/testcase/rtPhpTestFileTest.php
U   php/phpruntests/trunk/tests/testcase/rtPostExecutionTest.php
U   php/phpruntests/trunk/tests/testcase/rtPostRawExecutionTest.php
U   php/phpruntests/trunk/tests/testcase/rtSkipIfExecutionTest.php
U   php/phpruntests/trunk/tests/testcase/rtTestExecutionTest.php
U   php/phpruntests/trunk/tests/testcase/rtTestOutputWriterTest.php
U   php/phpruntests/trunk/tests/testcase/rtTestResultsTest.php

Log:
changes to tests to match parser changes
Modified: php/phpruntests/trunk/tests/testcase/rtCleanExecutionTest.php
===
--- php/phpruntests/trunk/tests/testcase/rtCleanExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtCleanExecutionTest.php	2009-07-15 10:35:41 UTC (rev 284112)
@@ -38,6 +38,7 @@
 $testFile = new rtPhpTestFile();
 $testFile->doRead($testFiles[0]);
 $testFile->normaliseLineEndings();
+$testFile->removeEmptySections();

 //Create a new test case
 $status = new rtTestStatus($testFile->getTestName());
@@ -65,6 +66,7 @@
 $testFile = new rtPhpTestFile();
 $testFile->doRead($testFiles[0]);
 $testFile->normaliseLineEndings();
+$testFile->removeEmptySections();

 //Create a new test case
 $status = new rtTestStatus($testFile->getTestName());

Modified: php/phpruntests/trunk/tests/testcase/rtCookieExecutionTest.php
===
--- php/phpruntests/trunk/tests/testcase/rtCookieExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtCookieExecutionTest.php	2009-07-15 10:35:41 UTC (rev 284112)
@@ -37,6 +37,7 @@
 $testFile = new rtPhpTestFile();
 $testFile->doRead($testFiles[0]);
 $testFile->normaliseLineEndings();
+$testFile->removeEmptySections();

 //Create a new test case
 $status = new rtTestStatus($testFile->getTestName());

Modified: php/phpruntests/trunk/tests/testcase/rtDeflatePostExecutionTest.php
===
--- php/phpruntests/trunk/tests/testcase/rtDeflatePostExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtDeflatePostExecutionTest.php	2009-07-15 10:35:41 UTC (rev 284112)
@@ -35,6 +35,7 @@
 $testFile = new rtPhpTestFile();
 $testFile->doRead($testFiles[0]);
 $testFile->normaliseLineEndings();
+$testFile->removeEmptySections();

 //Create a new test case
 $status = new rtTestStatus($testFile->getTestName());

Modified: php/phpruntests/trunk/tests/testcase/rtExpectHeadersExecutionTest.php
===
--- php/phpruntests/trunk/tests/testcase/rtExpectHeadersExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtExpectHeadersExecutionTest.php	2009-07-15 10:35:41 UTC (rev 284112)
@@ -39,6 +39,7 @@
 $testFile = new rtPhpTestFile();
 $testFile->doRead($testFiles[0]);
 $testFile->normaliseLineEndings();
+$testFile->removeEmptySections();

 //Create a new test case
 $status = new rtTestStatus($testFile->getTestName());
@@ -68,6 +69,7 @@
 $testFile = new rtPhpTestFile();
 $testFile->doRead($testFiles[0]);
 $testFile->normaliseLineEndings();
+$testFile->removeEmptySections();

 //Create a new test case
 $status = new rtTestStatus($testFile->getTestName());

Modified: php/phpruntests/trunk/tests/testcase/rtFileExternalExecutionTest.php
===
--- php/phpruntests/trunk/tests/testcase/rtFileExternalExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtFileExternalExecutionTest.php	2009-07-15 10:35:41 UTC (rev 284112)
@@ -37,6 +37,7 @@
 $testFile = new rtPhpTestFile();
 $testFile->doRead($testFiles[0]);
 $testFile->normaliseLineEndings();
+$testFile->removeEmptySections();

 //Create a new test case
 $status