Commit b274c849 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Ajout test du code de retour de authenticate().

parent bea3710e
......@@ -7,6 +7,7 @@ use UnicaenApp\Exception;
use UnicaenAuth\Authentication\Adapter\Cas;
use Zend\EventManager\EventManager;
use ZfcUser\Authentication\Adapter\AdapterChainEvent;
use Zend\Authentication\Result;
define ('__VENDOR_DIR__', __DIR__ . '/../../../../vendor');
......@@ -132,8 +133,9 @@ EOS;
$this->assertEquals(array('is_satisfied' => true, 'identity' => $username), $this->adapter->getStorage()->read());
$this->assertEquals("userAuthenticated", $event->getName());
$this->assertEquals(Result::SUCCESS, $event->getCode());
$this->assertEquals($username, $event->getIdentity());
$this->assertTrue($event->propagationIsStopped());
$this->assertEquals($username, $event->getParam('identity'));
}
public function testLogoutReturnsNullIfNoCasConfigSpecified()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment