Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ExpectationException.php

function 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 106

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.', __METHOD__), E_USER_DEPRECATED);
    return $this->session;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal