You are here

protected function ExpectationException::getSession in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/Exception/ExpectationException.php \Behat\Mink\Exception\ExpectationException::getSession()

Returns exception session.

Return value

Session

Deprecated

since 1.7, to be removed in 2.0. Use getDriver and the driver API instead.

File

vendor/behat/mink/src/Exception/ExpectationException.php, line 100

Class

ExpectationException
Exception thrown for failed expectations.

Namespace

Behat\Mink\Exception

Code

protected function getSession() {
  if (null === $this->session) {
    throw new \LogicException(sprintf('The deprecated method %s cannot be used when passing a driver in the constructor', __METHOD__));
  }
  @trigger_error(sprintf('The method %s is deprecated as of Mink 1.7 and will be removed in 2.0. Use getDriver and the driver API instead.'));
  return $this->session;
}