public function WatchdogContext::setUp in Lightning Core 8.3
Same name and namespace in other branches
- 8.5 tests/contexts/WatchdogContext.behat.inc \WatchdogContext::setUp()
- 8.2 tests/contexts/WatchdogContext.behat.inc \WatchdogContext::setUp()
- 8.4 tests/contexts/WatchdogContext.behat.inc \WatchdogContext::setUp()
Install dblog and store the time the scenario began.
@BeforeScenario ~@errors
Parameters
\Behat\Behat\Hook\Scope\ScenarioScope $scope: The scenario scope.
File
- tests/
contexts/ WatchdogContext.behat.inc, line 52
Class
- WatchdogContext
- Tracks errors logged to the database during the scenario.
Code
public function setUp(ScenarioScope $scope) {
if ($this
->isDiabled($scope)) {
return;
}
if (!\Drupal::moduleHandler()
->moduleExists('dblog')) {
$this->uninstall = \Drupal::service('module_installer')
->install([
'dblog',
]);
}
$this->startTime = time();
}