diff --git a/test/php/library/Icinga/Authentication/ManagerTest.php b/test/php/library/Icinga/Authentication/ManagerTest.php index d03d9ea22..4b946c7f0 100644 --- a/test/php/library/Icinga/Authentication/ManagerTest.php +++ b/test/php/library/Icinga/Authentication/ManagerTest.php @@ -111,13 +111,17 @@ class ManagerTest extends \PHPUnit_Framework_TestCase /** * - * @expectedException \Exception **/ public function testWriteSessionTwice() { - $auth = $this->getManagerInstance($session, false); - $this->assertFalse($auth->isAuthenticated(true)); - $auth->authenticate(new Credentials("jdoe", "passjdoe")); - + $exception = false; + try { + $auth = $this->getManagerInstance($session, false); + $this->assertFalse($auth->isAuthenticated(true)); + $auth->authenticate(new Credentials("jdoe", "passjdoe")); + } catch (\Exception $e) { + $exception = true; + } + $this->assertTrue($exception); } }