zoe             Wed, 15 Jul 2009 10:35:41 +0000

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 = new rtTestStatus($testFile->getTestName());
@@ -63,6 +64,7 @@
         $testFile = new rtPhpTestFile();
         $testFile->doRead($testFiles[0]);
         $testFile->normaliseLineEndings();
+        $testFile->removeEmptySections();

         //Create a new test case
         $status = new rtTestStatus($testFile->getTestName());
@@ -88,6 +90,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/rtGetExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.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());
@@ -67,6 +68,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/rtGzipPostExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtGzipPostExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtGzipPostExecutionTest.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/rtPhpTestFileTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtPhpTestFileTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtPhpTestFileTest.php	2009-07-15 10:35:41 UTC (rev 284112)
@@ -11,6 +11,8 @@
         $this->sample_test = $this->path_to_tests . '/sample_test.phpt';
         $this->sample_extra_char = $this->path_to_tests. '/sample_extra_char.phpt';
         $this->sample_windows_test = $this->path_to_tests . '/sample_windows_test.phpt';
+        $this->sample_es_test = $this->path_to_tests . '/sample_empty_sections.phpt';
+
     }

     public function testCreateInstance()
@@ -25,6 +27,7 @@
         $testFile = new rtPhpTestFile();
         $testFile->doRead($this->sample_test);
         $testFile->normaliseLineEndings();
+        $testFile->removeEmptySections();
         $fileArray = $testFile->getContents();
         $this->assertEquals('--TEST--', $fileArray[0]);

@@ -36,6 +39,8 @@
         $testFile = new rtPhpTestFile();
         $testFile->doRead($this->sample_windows_test);
         $testFile->normaliseLineEndings();
+        $testFile->removeEmptySections();
+
         $fileArray = $testFile->getContents();
         $fileString = implode(' ', $fileArray);

@@ -53,6 +58,7 @@
         $testFile = new rtPhpTestFile();
         $testFile->doRead($this->sample_test);
         $testFile->normaliseLineEndings();
+        $testFile->removeEmptySections();
         $fileArray = $testFile->getContents();
         $fileString = implode(' ', $fileArray);

@@ -70,8 +76,24 @@
         $testFile = new rtPhpTestFile();
         $testFile->doRead($this->sample_test);
         $testFile->normaliseLineEndings();
+        $testFile->removeEmptySections();

         $this->assertTrue($testFile->arePreConditionsMet());
-    }
+    }
+
+ public function testEmptySections()
+    {
+        $testFile = new rtPhpTestFile();
+        $testFile->doRead($this->sample_es_test);
+        $testFile->normaliseLineEndings();
+        $testFile->removeEmptySections();
+        $fileArray = $testFile->getContents();
+
+
+
+        //Check that there are windows line endings in the original
+        $this->assertFalse(in_array('--GET--', $fileArray));
+
+    }
 }
 ?>

Modified: php/phpruntests/trunk/tests/testcase/rtPostExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtPostExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtPostExecutionTest.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/rtPostRawExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtPostRawExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtPostRawExecutionTest.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/rtSkipIfExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtSkipIfExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtSkipIfExecutionTest.php	2009-07-15 10:35:41 UTC (rev 284112)
@@ -32,6 +32,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/rtTestExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtTestExecutionTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtTestExecutionTest.php	2009-07-15 10:35:41 UTC (rev 284112)
@@ -42,6 +42,7 @@
         $testFile =new rtPhpTestFile();
         $testFile->doRead($testFiles[0]);
         $testFile->normaliseLineEndings();
+        $testFile->removeEmptySections();

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

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

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

         //Create a new test case
         $status = new rtTestStatus($testFile->getTestName());
@@ -149,6 +153,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/rtTestOutputWriterTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtTestOutputWriterTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtTestOutputWriterTest.php	2009-07-15 10:35:41 UTC (rev 284112)
@@ -40,6 +40,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/rtTestResultsTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtTestResultsTest.php	2009-07-15 10:35:04 UTC (rev 284111)
+++ php/phpruntests/trunk/tests/testcase/rtTestResultsTest.php	2009-07-15 10:35:41 UTC (rev 284112)
@@ -43,6 +43,7 @@
         $testFile =new rtPhpTestFile();
         $testFile->doRead($testFiles[0]);
         $testFile->normaliseLineEndings();
+        $testFile->removeEmptySections();

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

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

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

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

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

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

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

         if (!$testFile->arePreConditionsMet()) {
             $testStatus = new rtTestStatus($testFile->getTestName());
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to