com phpruntests: changes to tests to match parser changes: tests/testcase/rtCleanExecutionTest.php tests/testcase/rtCookieExecutionTest.php
tests/testcase/rtDeflatePostExecutionTest.php tests/testcase/rtExpectHeadersExecutionTest.php tests/testcase/rtFileExternalExecutionTest.php
tests/testcase/rtGetExecutionTest.php tests/testcase/rtGzipPostExecutionTest.php tests/testcase/rtPhpTestFileTest.php
tests/testcase/rtPostExecutionTest.php tests/testca

From: Date: Wed, 15 Jul 2009 10:35:41 +0000
Subject: com phpruntests: changes to tests to match parser changes: tests/testcase/rtCleanExecutionTest.php tests/testcase/rtCookieExecutionTest.php
tests/testcase/rtDeflatePostExecutionTest.php tests/testcase/rtExpectHeadersExecutionTest.php tests/testcase/rtFileExternalExecutionTest.php
tests/testcase/rtGetExecutionTest.php tests/testcase/rtGzipPostExecutionTest.php tests/testcase/rtPhpTestFileTest.php
tests/testcase/rtPostExecutionTest.php tests/testca
Groups: php.qa 
Request: Send a blank email to php-qa+get-66347@lists.php.net to get a copy of this message
Commit: b804f15f2af37404605195b85c8db1252219a0f3 Author: Zoe Slattery <zoe@php.net> Wed, 15 Jul 2009 10:35:41 +0000 Parents: 892ae11e82f4e559675028cb37aba0012bc89d59 Branches: master Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=b804f15f2af37404605195b85c8db1252219a0f3 Log: changes to tests to match parser changes Changed paths: M tests/testcase/rtCleanExecutionTest.php M tests/testcase/rtCookieExecutionTest.php M tests/testcase/rtDeflatePostExecutionTest.php M tests/testcase/rtExpectHeadersExecutionTest.php M tests/testcase/rtFileExternalExecutionTest.php M tests/testcase/rtGetExecutionTest.php M tests/testcase/rtGzipPostExecutionTest.php M tests/testcase/rtPhpTestFileTest.php M tests/testcase/rtPostExecutionTest.php M tests/testcase/rtPostRawExecutionTest.php M tests/testcase/rtSkipIfExecutionTest.php M tests/testcase/rtTestExecutionTest.php M tests/testcase/rtTestOutputWriterTest.php M tests/testcase/rtTestResultsTest.php

diff --git a/tests/testcase/rtCleanExecutionTest.php b/tests/testcase/rtCleanExecutionTest.php index da10eda..2f8bd91 100644 --- a/tests/testcase/rtCleanExecutionTest.php +++ b/tests/testcase/rtCleanExecutionTest.php @@ -38,6 +38,7 @@ class rtCleanExecutionTest extends PHPUnit_Framework_TestCase $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 @@ class rtCleanExecutionTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtCookieExecutionTest.php b/tests/testcase/rtCookieExecutionTest.php index 7e579b2..04e97b0 100644 --- a/tests/testcase/rtCookieExecutionTest.php +++ b/tests/testcase/rtCookieExecutionTest.php @@ -37,6 +37,7 @@ class rtCookieExecutionTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtDeflatePostExecutionTest.php b/tests/testcase/rtDeflatePostExecutionTest.php index 12efd41..dc34d96 100644 --- a/tests/testcase/rtDeflatePostExecutionTest.php +++ b/tests/testcase/rtDeflatePostExecutionTest.php @@ -35,6 +35,7 @@ class rtDeflatePostExecutionTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtExpectHeadersExecutionTest.php b/tests/testcase/rtExpectHeadersExecutionTest.php index c9050a0..d3de71d 100644 --- a/tests/testcase/rtExpectHeadersExecutionTest.php +++ b/tests/testcase/rtExpectHeadersExecutionTest.php @@ -39,6 +39,7 @@ class rtExpectHeadersExecutionTest extends PHPUnit_Framework_TestCase $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 @@ class rtExpectHeadersExecutionTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtFileExternalExecutionTest.php b/tests/testcase/rtFileExternalExecutionTest.php index ea77c75..b014c70 100644 --- a/tests/testcase/rtFileExternalExecutionTest.php +++ b/tests/testcase/rtFileExternalExecutionTest.php @@ -37,6 +37,7 @@ class rtFileExternalExecutionTest extends PHPUnit_Framework_TestCase $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 @@ class rtFileExternalExecutionTest extends PHPUnit_Framework_TestCase $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 @@ class rtFileExternalExecutionTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtGetExecutionTest.php b/tests/testcase/rtGetExecutionTest.php index 78eb2e4..4a6a911 100644 --- a/tests/testcase/rtGetExecutionTest.php +++ b/tests/testcase/rtGetExecutionTest.php @@ -37,6 +37,7 @@ class rtGetExecutionTest extends PHPUnit_Framework_TestCase $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 @@ class rtGetExecutionTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtGzipPostExecutionTest.php b/tests/testcase/rtGzipPostExecutionTest.php index 9630aeb..f8762fe 100644 --- a/tests/testcase/rtGzipPostExecutionTest.php +++ b/tests/testcase/rtGzipPostExecutionTest.php @@ -35,6 +35,7 @@ class rtGzipPostExecutionTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtPhpTestFileTest.php b/tests/testcase/rtPhpTestFileTest.php index 1814fe5..8cbb4e9 100644 --- a/tests/testcase/rtPhpTestFileTest.php +++ b/tests/testcase/rtPhpTestFileTest.php @@ -11,6 +11,8 @@ class rtPhpTestFileTest extends PHPUnit_Framework_TestCase $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 @@ class rtPhpTestFileTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($this->sample_test); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); $fileArray = $testFile->getContents(); $this->assertEquals('--TEST--', $fileArray[0]); @@ -36,6 +39,8 @@ class rtPhpTestFileTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($this->sample_windows_test); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); + $fileArray = $testFile->getContents(); $fileString = implode(' ', $fileArray); @@ -53,6 +58,7 @@ class rtPhpTestFileTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($this->sample_test); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); $fileArray = $testFile->getContents(); $fileString = implode(' ', $fileArray); @@ -70,8 +76,24 @@ class rtPhpTestFileTest extends PHPUnit_Framework_TestCase $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)); + + } } ?> diff --git a/tests/testcase/rtPostExecutionTest.php b/tests/testcase/rtPostExecutionTest.php index 8420064..18bd0f6 100644 --- a/tests/testcase/rtPostExecutionTest.php +++ b/tests/testcase/rtPostExecutionTest.php @@ -35,6 +35,7 @@ class rtPostExecutionTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtPostRawExecutionTest.php b/tests/testcase/rtPostRawExecutionTest.php index 385836b..e529dea 100644 --- a/tests/testcase/rtPostRawExecutionTest.php +++ b/tests/testcase/rtPostRawExecutionTest.php @@ -35,6 +35,7 @@ class rtPostRawExecutionTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtSkipIfExecutionTest.php b/tests/testcase/rtSkipIfExecutionTest.php index d11490b..a4f0e44 100644 --- a/tests/testcase/rtSkipIfExecutionTest.php +++ b/tests/testcase/rtSkipIfExecutionTest.php @@ -32,6 +32,7 @@ class rtSkipIfExecutionTest extends PHPUnit_Framework_TestCase $testFile =new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtTestExecutionTest.php b/tests/testcase/rtTestExecutionTest.php index 3e6f94e..d8d66c3 100644 --- a/tests/testcase/rtTestExecutionTest.php +++ b/tests/testcase/rtTestExecutionTest.php @@ -42,6 +42,7 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestExecutionTest extends PHPUnit_Framework_TestCase $testFile =new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtTestOutputWriterTest.php b/tests/testcase/rtTestOutputWriterTest.php index fd9cb2c..4db1fbf 100644 --- a/tests/testcase/rtTestOutputWriterTest.php +++ b/tests/testcase/rtTestOutputWriterTest.php @@ -40,6 +40,7 @@ class rtTestOutputWriterTest extends PHPUnit_Framework_TestCase $testFile = new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); //Create a new test case $status = new rtTestStatus($testFile->getTestName()); diff --git a/tests/testcase/rtTestResultsTest.php b/tests/testcase/rtTestResultsTest.php index 7fc96d3..88a8954 100644 --- a/tests/testcase/rtTestResultsTest.php +++ b/tests/testcase/rtTestResultsTest.php @@ -43,6 +43,7 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $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 @@ class rtTestResultsTest extends PHPUnit_Framework_TestCase $testFile =new rtPhpTestFile(); $testFile->doRead($testFiles[0]); $testFile->normaliseLineEndings(); + $testFile->removeEmptySections(); if (!$testFile->arePreConditionsMet()) { $testStatus = new rtTestStatus($testFile->getTestName());
« previous php.qa (#66347) next »