Version 1
[yaffs-website] / vendor / jcalderonzumba / mink-phantomjs-driver / src / NavigationTrait.php
diff --git a/vendor/jcalderonzumba/mink-phantomjs-driver/src/NavigationTrait.php b/vendor/jcalderonzumba/mink-phantomjs-driver/src/NavigationTrait.php
new file mode 100644 (file)
index 0000000..88ca429
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+
+namespace Zumba\Mink\Driver;
+
+/**
+ * Trait NavigationTrait
+ * @package Zumba\Mink\Driver
+ */
+trait NavigationTrait {
+  /**
+   * Visits a given url
+   * @param string $url
+   */
+  public function visit($url) {
+    $this->browser->visit($url);
+  }
+
+  /**
+   * Gets the current url if any
+   * @return string
+   */
+  public function getCurrentUrl() {
+    return $this->browser->currentUrl();
+  }
+
+
+  /**
+   * Reloads the page if possible
+   */
+  public function reload() {
+    $this->browser->reload();
+  }
+
+  /**
+   * Goes forward if possible
+   */
+  public function forward() {
+    $this->browser->goForward();
+  }
+
+  /**
+   * Goes back if possible
+   */
+  public function back() {
+    $this->browser->goBack();
+  }
+
+
+}