From: gggeek Date: Tue, 14 Apr 2015 23:15:44 +0000 (+0100) Subject: Make charset-related tests more friendly to hhvm; stricter tests for demo files X-Git-Tag: 4.0.0-alpha^2~84 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=4bc0f6904a12381079bec46ad648f6170f07d449 Make charset-related tests more friendly to hhvm; stricter tests for demo files --- diff --git a/tests/1ParsingBugsTest.php b/tests/1ParsingBugsTest.php index 28bb9d5..6a6a3f9 100644 --- a/tests/1ParsingBugsTest.php +++ b/tests/1ParsingBugsTest.php @@ -451,7 +451,7 @@ and there they were.postid7414222assertEquals($string, $v); - $f = 'userid311127 + $f = 'userid311127 dateCreated20011126T09:17:52content' . utf8_encode($string) . 'postid7414222 '; $r = $s->parseResponse($f, false, 'phpvals'); @@ -478,7 +478,7 @@ and there they were.postid7414222assertEquals($string, $v); - $f = 'userid311127 + $f = 'userid311127 dateCreated20011126T09:17:52content' . $string . 'postid7414222 '; $r = $s->parseResponse($f, false, 'phpvals'); diff --git a/tests/3LocalhostTest.php b/tests/3LocalhostTest.php index ea7c5bf..e73bf61 100644 --- a/tests/3LocalhostTest.php +++ b/tests/3LocalhostTest.php @@ -167,7 +167,7 @@ class LocalhostTest extends PHPUnit_Framework_TestCase { $sendstring = "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne"; - $f = 'examples.stringecho'. + $f = 'examples.stringecho'. $sendstring. ''; $v = $this->send($f); diff --git a/tests/5DemofilesTest.php b/tests/5DemofilesTest.php index 63708fe..b7a3871 100644 --- a/tests/5DemofilesTest.php +++ b/tests/5DemofilesTest.php @@ -54,7 +54,7 @@ class DemoFilesTest extends PhpXmlRpc_LocalFileTestCase public function testSimpleCall() { - $page = $this->request('client/simple_call.php'); + $page = $this->request('client/simple_call.php', 'GET', null, true); } public function testWhich() diff --git a/tests/LocalFileTestCase.php b/tests/LocalFileTestCase.php index 688e0df..59818c8 100644 --- a/tests/LocalFileTestCase.php +++ b/tests/LocalFileTestCase.php @@ -41,7 +41,7 @@ abstract class PhpXmlRpc_LocalFileTestCase extends PHPUnit_Framework_TestCase return $result; } - protected function request($file, $method = 'GET', $payload = '') + protected function request($file, $method = 'GET', $payload = '', $emptyPageOk = false) { $url = $this->baseUrl . $file; @@ -68,6 +68,9 @@ abstract class PhpXmlRpc_LocalFileTestCase extends PHPUnit_Framework_TestCase curl_close($ch); $this->assertNotFalse($page); + if (!$emptyPageOk) { + $this->assertNotEquals('', $page); + } $this->assertNotContains('Fatal error', $page); $this->assertNotContains('Notice:', $page);