Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
auth
Commits
c78b2b4a
Commit
c78b2b4a
authored
Jul 10, 2013
by
Bertrand Gauthier
Browse files
Ajout tests pour meilleure couverture.
parent
48894c8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/UnicaenAuthTest/Authentication/Adapter/CasTest.php
View file @
c78b2b4a
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment