You are here

public function MinkTest::testSessionAutostop in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/tests/MinkTest.php \Behat\Mink\Tests\MinkTest::testSessionAutostop()

File

vendor/behat/mink/tests/MinkTest.php, line 41

Class

MinkTest

Namespace

Behat\Mink\Tests

Code

public function testSessionAutostop() {
  $session1 = $this
    ->getSessionMock();
  $session2 = $this
    ->getSessionMock();
  $this->mink
    ->registerSession('my1', $session1);
  $this->mink
    ->registerSession('my2', $session2);
  $session1
    ->expects($this
    ->once())
    ->method('isStarted')
    ->will($this
    ->returnValue(true));
  $session1
    ->expects($this
    ->once())
    ->method('stop');
  $session2
    ->expects($this
    ->once())
    ->method('isStarted')
    ->will($this
    ->returnValue(false));
  $session2
    ->expects($this
    ->never())
    ->method('stop');
  unset($this->mink);
}