You are here

class StatusCodeTest in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/behat/mink/driver-testsuite/tests/Basic/StatusCodeTest.php \Behat\Mink\Tests\Driver\Basic\StatusCodeTest

Hierarchy

  • class \Behat\Mink\Tests\Driver\TestCase extends \Behat\Mink\Tests\Driver\PHPUnit_Framework_TestCase

Expanded class hierarchy of StatusCodeTest

File

vendor/behat/mink/driver-testsuite/tests/Basic/StatusCodeTest.php, line 7

Namespace

Behat\Mink\Tests\Driver\Basic
View source
class StatusCodeTest extends TestCase {
  public function testStatuses() {
    $this
      ->getSession()
      ->visit($this
      ->pathTo('/index.html'));
    $this
      ->assertEquals(200, $this
      ->getSession()
      ->getStatusCode());
    $this
      ->assertEquals($this
      ->pathTo('/index.html'), $this
      ->getSession()
      ->getCurrentUrl());
    $this
      ->getSession()
      ->visit($this
      ->pathTo('/404.php'));
    $this
      ->assertEquals($this
      ->pathTo('/404.php'), $this
      ->getSession()
      ->getCurrentUrl());
    $this
      ->assertEquals(404, $this
      ->getSession()
      ->getStatusCode());
    $this
      ->assertEquals('Sorry, page not found', $this
      ->getSession()
      ->getPage()
      ->getContent());
  }

}

Members

Namesort descending Modifiers Type Description Overrides
StatusCodeTest::testStatuses public function
TestCase::$config private static property
TestCase::$mink private static property Mink session manager.
TestCase::checkRequirements protected function
TestCase::createDriver protected function Creates a new driver instance.
TestCase::findById protected function
TestCase::getAssertSession protected function Returns assert session.
TestCase::getConfig private static function
TestCase::getSession protected function Returns session.
TestCase::mapRemoteFilePath protected function Map remote file path.
TestCase::onNotSuccessfulTest protected function
TestCase::pathTo protected function
TestCase::safePageWait protected function Waits for a condition to be true, considering than it is successful for drivers not supporting wait().
TestCase::setUpBeforeClass public static function Initializes the test case.
TestCase::tearDown protected function