diff options
Diffstat (limited to '_test/tests/test/scope.test.php')
-rw-r--r-- | _test/tests/test/scope.test.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/_test/tests/test/scope.test.php b/_test/tests/test/scope.test.php new file mode 100644 index 000000000..9341ecef8 --- /dev/null +++ b/_test/tests/test/scope.test.php @@ -0,0 +1,49 @@ +<?php + +/** + * @group integration + */ +class InttestsResetTest extends DokuWikiTest { + /** + * It should be possible to have two test cases within one test class. + */ + function testFirstRun() { + $request = new TestRequest(); + $response = $request->execute(); + $this->assertTrue( + strpos($response->getContent(), 'DokuWiki') >= 0, + 'DokuWiki was not a word in the output' + ); + } + + /** + * @depends testFirstRun + */ + function testSecondRun() { + $request = new TestRequest(); + $response = $request->execute(); + $this->assertTrue( + strpos($response->getContent(), 'DokuWiki') >= 0, + 'DokuWiki was not a word in the output' + ); + } + + /** + * two requests within the same test case should be possible + */ + function testMultipleRequests() { + $request = new TestRequest(); + $response = $request->execute(); + $this->assertTrue( + strpos($response->getContent(), 'DokuWiki') >= 0, + 'DokuWiki was not a word in the output' + ); + + $request = new TestRequest(); + $response = $request->execute(); + $this->assertTrue( + strpos($response->getContent(), 'DokuWiki') >= 0, + 'DokuWiki was not a word in the output' + ); + } +} |