Version 1
[yaffs-website] / vendor / jcalderonzumba / mink-phantomjs-driver / tests / integration / Custom / PhantomJSStatusCodeTest.php
diff --git a/vendor/jcalderonzumba/mink-phantomjs-driver/tests/integration/Custom/PhantomJSStatusCodeTest.php b/vendor/jcalderonzumba/mink-phantomjs-driver/tests/integration/Custom/PhantomJSStatusCodeTest.php
new file mode 100644 (file)
index 0000000..e99a583
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+namespace Behat\Mink\Tests\Driver\Basic;
+
+use Behat\Mink\Tests\Driver\TestCase;
+
+class PhantomJSStatusCodeTest 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()->getText());
+  }
+}