Skip to content
Snippets Groups Projects
Commit c78b2b4a authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Ajout tests pour meilleure couverture.

parent 48894c8c
Branches
Tags
No related merge requests found
......@@ -95,6 +95,30 @@ class CasTest extends PHPUnit_Framework_TestCase
$this->assertNull($result);
}
public function testCanActivateCasDebugMode()
{
$this->moduleOptions->setCas(array(
'connection' => array(
'default' => array(
'params' => array(
'hostname' => 'cas.unicaen.fr',
'port' => 443,
'version' => "2.0",
'uri' => "",
'debug' => true, // debug mode
),
),
),
));
$casClient = $this->getMock('phpCAS', array('setDebug', 'client', 'setNoCasServerValidation'));
$casClient->staticExpects($this->once())
->method('setDebug');
$this->adapter->setCasClient($casClient);
$this->adapter->getCasClient();
}
public function testCanRedirectToCasIfNotAuthenticated()
{
CAS_GracefullTerminationException::throwInsteadOfExiting();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment