3 namespace Behat\Mink\Tests\Driver\Basic;
5 use Behat\Mink\Tests\Driver\TestCase;
7 class PhantomJSStatusCodeTest extends TestCase {
8 public function testStatuses() {
9 $this->getSession()->visit($this->pathTo('/index.html'));
11 $this->assertEquals(200, $this->getSession()->getStatusCode());
12 $this->assertEquals($this->pathTo('/index.html'), $this->getSession()->getCurrentUrl());
14 $this->getSession()->visit($this->pathTo('/404.php'));
16 $this->assertEquals($this->pathTo('/404.php'), $this->getSession()->getCurrentUrl());
17 $this->assertEquals(404, $this->getSession()->getStatusCode());
18 $this->assertEquals('Sorry, page not found', $this->getSession()->getPage()->getText());