for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?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);
browser
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
}
* 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();
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: