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:
Jannis Moßhammer 2013-06-14 09:39:34 +02:00
parent 780ea68f2f
commit 9563541814

View File

@ -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);
}
}