mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
Fix ManagerTest's invaldi @expectedException annotation
The annotation catched the generic \Exception, which PHPunit forbids. Now the tests directly catches and asserts this exception refs #4310
This commit is contained in:
parent
780ea68f2f
commit
9563541814
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user