You are here

public function Mink::setDefaultSessionName in Zircon Profile 8

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

Sets default session name to use.

Parameters

string $name name of the registered session:

Throws

\InvalidArgumentException

File

vendor/behat/mink/src/Mink.php, line 81

Class

Mink
Mink sessions manager.

Namespace

Behat\Mink

Code

public function setDefaultSessionName($name) {
  $name = strtolower($name);
  if (!isset($this->sessions[$name])) {
    throw new \InvalidArgumentException(sprintf('Session "%s" is not registered.', $name));
  }
  $this->defaultSessionName = $name;
}