diff options
Diffstat (limited to 'build/integration/features/bootstrap/LDAPContext.php')
-rw-r--r-- | build/integration/features/bootstrap/LDAPContext.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/LDAPContext.php b/build/integration/features/bootstrap/LDAPContext.php index 4b9810aeff7..ce63bc3f698 100644 --- a/build/integration/features/bootstrap/LDAPContext.php +++ b/build/integration/features/bootstrap/LDAPContext.php @@ -155,4 +155,17 @@ class LDAPContext implements Context { } } } + + /** + * @Given /^Expect ServerException on failed web login as "([^"]*)"$/ + */ + public function expectServerExceptionOnFailedWebLoginAs($login) { + try { + $this->loggingInUsingWebAs($login); + } catch (\GuzzleHttp\Exception\ServerException $e) { + PHPUnit_Framework_Assert::assertEquals(500, $e->getResponse()->getStatusCode()); + return; + } + PHPUnit_Framework_Assert::assertTrue(false, 'expected Exception not received'); + } } |