protected function BuildTestBase::initMink in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::initMink()
Set up the Mink session manager.
Return value
\Behat\Mink\Session
2 calls to BuildTestBase::initMink()
- BuildTestBase::setUp in core/
tests/ Drupal/ BuildTests/ Framework/ BuildTestBase.php - BuildTestBase::stopServer in core/
tests/ Drupal/ BuildTests/ Framework/ BuildTestBase.php - Stop the HTTP server, zero out all necessary variables.
File
- core/
tests/ Drupal/ BuildTests/ Framework/ BuildTestBase.php, line 221
Class
- BuildTestBase
- Provides a workspace to test build processes.
Namespace
Drupal\BuildTests\FrameworkCode
protected function initMink() {
$client = new DrupalTestBrowser();
$client
->followMetaRefresh(TRUE);
$driver = new BrowserKitDriver($client);
$session = new Session($driver);
$this->mink = new Mink();
$this->mink
->registerSession('default', $session);
$this->mink
->setDefaultSessionName('default');
$session
->start();
return $session;
}