com phpruntests: tidying up: build.xml phpt-tests/sample_clea n.php phpt-tests/sample_clean_fail.php phpt-tests/s ample_fileexternal.phpt
phpt-tests/sample_gzippost.ph pt phpt-tests/utils/hw.php phpt-tests/utils/hw.save p hpt-tests/utils/windows_line_endings.php phpt-tests/win
dows_line_endings.php tests/testcase/rtCookieExecutionT est.php
| From: | David Soria Parra | Date: | Wed, 09 May 2012 16:26:29 +0000 |
| Subject: | com phpruntests: tidying up: build.xml phpt-tests/sample_clea n.php phpt-tests/sample_clean_fail.php phpt-tests/s ample_fileexternal.phpt phpt-tests/sample_gzippost.ph pt phpt-tests/utils/hw.php phpt-tests/utils/hw.save p hpt-tests/utils/windows_line_endings.php phpt-tests/win dows_line_endings.php tests/testcase/rtCookieExecutionT est.php |
||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-66289@lists.php.net to get a copy of this message | ||
Commit: 1f01848175285c6c830eb039abf60b654e29cb6b
Author: Zoe Slattery <zoe@php.net> Wed, 9 May 2012 16:26:29 +0000
Parents: 2e402b06f95fd0d4029d0c55d16dd9deb4b0be84
Branches: master
Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=1f01848175285c6c830eb039abf60b654e29cb6b
Log:
tidying up
Changed paths:
M build.xml
D phpt-tests/sample_clean.php
D phpt-tests/sample_clean_fail.php
M phpt-tests/sample_fileexternal.phpt
M phpt-tests/sample_gzippost.phpt
A phpt-tests/utils/hw.php
A phpt-tests/utils/hw.save
A phpt-tests/utils/windows_line_endings.php
D phpt-tests/windows_line_endings.php
M tests/testcase/rtCookieExecutionTest.php
Diff:
diff --git a/build.xml b/build.xml
index 4f3294c..cb5cbd2 100755
--- a/build.xml
+++ b/build.xml
@@ -11,6 +11,15 @@
<delete dir="QA/sapi" />
<delete dir="QA/tests" />
<delete dir="QA/Zend" />
+ <delete>
+ <fileset dir="phpt-tests" includes="*.out" />
+ <fileset dir="phpt-tests" includes="*.exp" />
+ <fileset dir="phpt-tests" includes="*.diff" />
+ <fileset dir="phpt-tests" includes="*.log" />
+ <fileset dir="phpt-tests" includes="*.sh" />
+ <fileset dir="phpt-tests" includes="*.post" />
+ <fileset dir="phpt-tests" includes="*.php" />
+ </delete>
</target>
<target name="qa" depends="lint, test, coverage, compare, doc"
description="Perform quality assurance..">
@@ -28,13 +37,6 @@
<include name="**/*.php"/>
</fileset>
</phplint>
-
- <phplint haltonfailure="true">
- <fileset dir="tests">
- <include name="*.php"/>
- <include name="**/*.php"/>
- </fileset>
- </phplint>
</target>
<target name="test" description="Run all unit tests.">
diff --git a/phpt-tests/sample_clean.php b/phpt-tests/sample_clean.php
deleted file mode 100644
index 095448f..0000000
--- a/phpt-tests/sample_clean.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
- $file_name = dirname(__FILE__) . "/cleantest.tmp";
- file_put_contents($file_name, "hello world");
- echo "written\n";
-
-?>
diff --git a/phpt-tests/sample_clean_fail.php b/phpt-tests/sample_clean_fail.php
deleted file mode 100644
index 095448f..0000000
--- a/phpt-tests/sample_clean_fail.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
- $file_name = dirname(__FILE__) . "/cleantest.tmp";
- file_put_contents($file_name, "hello world");
- echo "written\n";
-
-?>
diff --git a/phpt-tests/sample_fileexternal.phpt b/phpt-tests/sample_fileexternal.phpt
index 324ca04..1371f40 100644
--- a/phpt-tests/sample_fileexternal.phpt
+++ b/phpt-tests/sample_fileexternal.phpt
@@ -1,6 +1,6 @@
--TEST--
sample test for file_external
--FILE_EXTERNAL--
-hw.php
+utils/hw.php
--EXPECT--
hello world
diff --git a/phpt-tests/sample_gzippost.phpt b/phpt-tests/sample_gzippost.phpt
index 3dbe67c..432b4a1 100644
--- a/phpt-tests/sample_gzippost.phpt
+++ b/phpt-tests/sample_gzippost.phpt
@@ -5,8 +5,8 @@ blahblah=blah
--FILE--
<?php
$content = file_get_contents('php://input');
-
-if ($content != gzencode('blahblah=blah'))
+$string = gzdecode($content);
+if ($string != "blahblah=blah")
{
echo "invalid gzipped content";
} else {
diff --git a/phpt-tests/utils/hw.php b/phpt-tests/utils/hw.php
new file mode 100644
index 0000000..32f8f4e
--- /dev/null
+++ b/phpt-tests/utils/hw.php
@@ -0,0 +1,3 @@
+<?php
+ echo "hello world\n";
+?>
diff --git a/phpt-tests/utils/hw.save b/phpt-tests/utils/hw.save
new file mode 100644
index 0000000..32f8f4e
--- /dev/null
+++ b/phpt-tests/utils/hw.save
@@ -0,0 +1,3 @@
+<?php
+ echo "hello world\n";
+?>
diff --git a/phpt-tests/utils/windows_line_endings.php b/phpt-tests/utils/windows_line_endings.php
new file mode 100644
index 0000000..36fba9a
--- /dev/null
+++ b/phpt-tests/utils/windows_line_endings.php
@@ -0,0 +1,10 @@
+<?php
+// Utility to create a test case with windows line endings.
+$testFile = $argv[1];
+$windowsTestFile = $argv[2];
+
+$string = file_get_contents($testFile);
+$string2 = preg_replace("/\\n/", "\r\n", $string);
+file_put_contents($windowsTestFile, (binary) $string2);
+
+?>
diff --git a/phpt-tests/windows_line_endings.php b/phpt-tests/windows_line_endings..php
deleted file mode 100644
index 36fba9a..0000000
--- a/phpt-tests/windows_line_endings.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-// Utility to create a test case with windows line endings.
-$testFile = $argv[1];
-$windowsTestFile = $argv[2];
-
-$string = file_get_contents($testFile);
-$string2 = preg_replace("/\\n/", "\r\n", $string);
-file_put_contents($windowsTestFile, (binary) $string2);
-
-?>
diff --git a/tests/testcase/rtCookieExecutionTest.php b/tests/testcase/rtCookieExecutionTest.php
index c2148a1..3ac5280 100644
--- a/tests/testcase/rtCookieExecutionTest.php
+++ b/tests/testcase/rtCookieExecutionTest.php
@@ -12,7 +12,7 @@ class rtCookieExecutionTest extends PHPUnit_Framework_TestCase
{
$this->php = trim(shell_exec("which php"));
$this->php_cgi = trim(shell_exec("which php-cgi"));
-
+
$this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
$this->sample_test = $this->path_to_tests . '/sample_cookie.phpt';
}
@@ -31,7 +31,7 @@ class rtCookieExecutionTest extends PHPUnit_Framework_TestCase
//Retrieve the array of test file names
$testFiles = $config->getSetting('TestFiles');
-
+
//Read the test file
$testFile = new rtPhpTestFile();
$testFile->doRead($testFiles[0]);