public function NavigationTest::testPageControls in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink/driver-testsuite/tests/Basic/NavigationTest.php \Behat\Mink\Tests\Driver\Basic\NavigationTest::testPageControls()
File
- vendor/
behat/ mink/ driver-testsuite/ tests/ Basic/ NavigationTest.php, line 15
Class
Namespace
Behat\Mink\Tests\Driver\BasicCode
public function testPageControls() {
$this
->getSession()
->visit($this
->pathTo('/randomizer.php'));
$number1 = $this
->getAssertSession()
->elementExists('css', '#number')
->getText();
$this
->getSession()
->reload();
$number2 = $this
->getAssertSession()
->elementExists('css', '#number')
->getText();
$this
->assertNotEquals($number1, $number2);
$this
->getSession()
->visit($this
->pathTo('/links.html'));
$this
->getSession()
->getPage()
->clickLink('Random number page');
$this
->assertEquals($this
->pathTo('/randomizer.php'), $this
->getSession()
->getCurrentUrl());
$this
->getSession()
->back();
$this
->assertEquals($this
->pathTo('/links.html'), $this
->getSession()
->getCurrentUrl());
$this
->getSession()
->forward();
$this
->assertEquals($this
->pathTo('/randomizer.php'), $this
->getSession()
->getCurrentUrl());
}