[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/_test/tests/test/ -> scope.test.php (source)

   1  <?php
   2  
   3  /**
   4   * @group integration
   5   */
   6  class InttestsResetTest extends DokuWikiTest {
   7      /**
   8       * It should be possible to have two test cases within one test class.
   9       */
  10      function testFirstRun() {
  11          $request = new TestRequest();
  12          $response = $request->execute();
  13          $this->assertTrue(
  14              strpos($response->getContent(), 'DokuWiki') >= 0,
  15              'DokuWiki was not a word in the output'
  16          );
  17      }
  18  
  19      /**
  20       * @depends testFirstRun
  21       */
  22      function testSecondRun() {
  23          $request = new TestRequest();
  24          $response = $request->execute();
  25          $this->assertTrue(
  26              strpos($response->getContent(), 'DokuWiki') >= 0,
  27              'DokuWiki was not a word in the output'
  28          );
  29      }
  30  
  31      /**
  32       * two requests within the same test case should be possible
  33       */
  34      function testMultipleRequests() {
  35          $request = new TestRequest();
  36          $response = $request->execute();
  37          $this->assertTrue(
  38              strpos($response->getContent(), 'DokuWiki') >= 0,
  39              'DokuWiki was not a word in the output'
  40          );
  41  
  42          $request = new TestRequest();
  43          $response = $request->execute();
  44          $this->assertTrue(
  45              strpos($response->getContent(), 'DokuWiki') >= 0,
  46              'DokuWiki was not a word in the output'
  47          );
  48      }
  49  }