diff options
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r-- | build/integration/features/bootstrap/Auth.php | 3 | ||||
-rw-r--r-- | build/integration/features/bootstrap/CommandLineContext.php | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/Auth.php b/build/integration/features/bootstrap/Auth.php index fd1b2e05a80..7addcab5f97 100644 --- a/build/integration/features/bootstrap/Auth.php +++ b/build/integration/features/bootstrap/Auth.php @@ -22,6 +22,7 @@ use GuzzleHttp\Client; use GuzzleHttp\Exception\ClientException; +use GuzzleHttp\Exception\ServerException; use GuzzleHttp\Cookie\CookieJar; require __DIR__ . '/../../vendor/autoload.php'; @@ -68,6 +69,8 @@ trait Auth { $this->response = $this->client->send($request); } catch (ClientException $ex) { $this->response = $ex->getResponse(); + } catch (ServerException $ex) { + $this->response = $ex->getResponse(); } } diff --git a/build/integration/features/bootstrap/CommandLineContext.php b/build/integration/features/bootstrap/CommandLineContext.php index c8253966cdb..9a48c8517c7 100644 --- a/build/integration/features/bootstrap/CommandLineContext.php +++ b/build/integration/features/bootstrap/CommandLineContext.php @@ -36,6 +36,20 @@ class CommandLineContext implements \Behat\Behat\Context\Context { $this->remoteBaseUrl = $baseUrl; } + /** + * @Given Maintenance mode is enabled + */ + public function maintenanceModeIsEnabled() { + $this->runOcc(['maintenance:mode', '--on']); + } + + /** + * @Then Maintenance mode is disabled + */ + public function maintenanceModeIsDisabled() { + $this->runOcc(['maintenance:mode', '--off']); + } + /** @BeforeScenario */ public function gatherContexts(BeforeScenarioScope $scope) { $environment = $scope->getEnvironment(); |