summaryrefslogtreecommitdiff
path: root/_test/tests/test/scope.test.php
blob: 8c4ad9cf81d4b0025f03a33910c4d478e1724013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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'
        );
    }
}