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

Ajout tests pour meilleure couverture.

parent 48894c8c
......@@ -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();
......
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