diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-02-14 10:08:54 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-02-14 10:08:54 +0100 |
commit | 2fc5588a5bd4e73b65d615879e6fd58434fbe90a (patch) | |
tree | 3ac69a6acd1fb7fb7317398971eb451416f0b3cb /_test/tests | |
parent | 0931b30cccfd534a64df4da966e67e0175948849 (diff) | |
parent | fe717f57f7a1c262eb6104ccb575ee3294712afa (diff) | |
download | rpg-2fc5588a5bd4e73b65d615879e6fd58434fbe90a.tar.gz rpg-2fc5588a5bd4e73b65d615879e6fd58434fbe90a.tar.bz2 |
Merge pull request #529 from lisps/TestRequest
fix TestRequest
Diffstat (limited to '_test/tests')
-rw-r--r-- | _test/tests/test/basic.test.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/_test/tests/test/basic.test.php b/_test/tests/test/basic.test.php index 86acef935..0639f0c5a 100644 --- a/_test/tests/test/basic.test.php +++ b/_test/tests/test/basic.test.php @@ -33,7 +33,7 @@ class InttestsBasicTest extends DokuWikiTest { $response = $request->execute(); $this->assertTrue( - strpos($response->getContent(), 'DokuWiki') >= 0, + strpos($response->getContent(), 'DokuWiki') !== false, 'DokuWiki was not a word in the output' ); } @@ -60,7 +60,7 @@ class InttestsBasicTest extends DokuWikiTest { $this->assertEquals('wiki:dokuwiki', $request->getPost('id')); // output check - $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0); + $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') !== false); } function testPostGet() { @@ -84,7 +84,7 @@ class InttestsBasicTest extends DokuWikiTest { $this->assertEquals('wiki:dokuwiki', $request->getGet('id')); // output check - $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0); + $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') !== false); } function testGet() { @@ -116,7 +116,7 @@ class InttestsBasicTest extends DokuWikiTest { $this->assertEquals('bar', $request->getGet('test')); // output check - $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0); + $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') !== false); } function testScripts() { @@ -168,5 +168,13 @@ class InttestsBasicTest extends DokuWikiTest { $response = new TestResponse('',array_slice($this->some_headers,0,-2)); // slice off the last two headers to leave no status header $this->assertNull($response->getStatusCode()); } + + function testINPUT() { + $request = new TestRequest(); + $response = $request->get(array('id' => 'mailinglist'), '/doku.php'); + + // output check + $this->assertTrue(strpos($response->getContent(), 'Netiquette') !== false); + } } |