Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
verify that multiple requests can be made with multiple test methods.
- Loading branch information
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
_testing/inttests/basic.test.php → _testing/inttests/inttests_basic.test.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
class ScopeTest extends PHPUnit_Framework_TestCase { | ||
/** | ||
* 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' | ||
); | ||
} | ||
} |