public function MinkTest::testGetDefaultSession in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/tests/MinkTest.php \Behat\Mink\Tests\MinkTest::testGetDefaultSession()
File
- vendor/
behat/ mink/ tests/ MinkTest.php, line 117
Class
Namespace
Behat\Mink\TestsCode
public function testGetDefaultSession() {
$session1 = $this
->getSessionMock();
$session2 = $this
->getSessionMock();
$this
->assertNotSame($session1, $session2);
$this->mink
->registerSession('session_1', $session1);
$this->mink
->registerSession('session_2', $session2);
$this->mink
->setDefaultSessionName('session_2');
$this
->assertSame($session1, $this->mink
->getSession('session_1'));
$this
->assertSame($session2, $this->mink
->getSession('session_2'));
$this
->assertSame($session2, $this->mink
->getSession());
$this->mink
->setDefaultSessionName('session_1');
$this
->assertSame($session1, $this->mink
->getSession());
}