Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
2a96e2cf
Commit
2a96e2cf
authored
8 years ago
by
vrioux
Browse files
Options
Downloads
Patches
Plain Diff
added a bit more test coverage, I think
parent
8a11719c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/modules/consent/lib/Auth/Process/ConsentTest.php
+7
-6
7 additions, 6 deletions
tests/modules/consent/lib/Auth/Process/ConsentTest.php
with
7 additions
and
6 deletions
tests/modules/consent/lib/Auth/Process/ConsentTest.php
+
7
−
6
View file @
2a96e2cf
...
...
@@ -43,8 +43,11 @@ class ConsentTest extends \PHPUnit_Framework_TestCase
'metadata-set'
=>
'saml20-idp-local'
,
'consent.disable'
=>
array
(
'https://valid.flatstring.example.that.does.not.match'
,
array
(),
// invalid consent option array should be ignored
array
(
'type'
=>
'invalid'
),
// invalid consent option type should be ignored
array
(
'type'
=>
'regex'
),
// regex consent option without pattern should be ignored
array
(
'type'
=>
'regex'
,
'pattern'
=>
'/.*\.valid.regex\.that\.does\.not\.match.*/i'
),
'https://sp.example.org/my-sp'
,
'https://sp.example.org/my-sp'
,
// accept the SP that has this specific entityid
),
'SingleSignOnService'
=>
array
(
array
(
...
...
@@ -54,7 +57,7 @@ class ConsentTest extends \PHPUnit_Framework_TestCase
),
),
'Destination'
=>
array
(
'entityid'
=>
'https://sp.example.org/my-sp'
,
'entityid'
=>
'https://sp.example.org/my-sp'
,
// valid entityid equal to the last one in the consent.disable array
'metadata-set'
=>
'saml20-sp-remote'
,
),
'UserID'
=>
'jdoe'
,
...
...
@@ -71,9 +74,7 @@ class ConsentTest extends \PHPUnit_Framework_TestCase
'entityid'
=>
'https://idp.example.org'
,
'metadata-set'
=>
'saml20-idp-local'
,
'consent.disable'
=>
array
(
'https://valid.flatstring.example.that.does.not.match'
,
array
(
'type'
=>
'regex'
,
'pattern'
=>
'/.*\.valid.regex\.that\.does\.not\.match.*/i'
),
array
(
'type'
=>
'regex'
,
'pattern'
=>
'/.*\.example\.org.*/i'
),
array
(
'type'
=>
'regex'
,
'pattern'
=>
'/.*\.example\.org.*/i'
),
// accept any SP that has an entityid that contains the string ".example.org"
),
'SingleSignOnService'
=>
array
(
array
(
...
...
@@ -83,7 +84,7 @@ class ConsentTest extends \PHPUnit_Framework_TestCase
),
),
'Destination'
=>
array
(
'entityid'
=>
'https://sp.example.org/my-sp'
,
'entityid'
=>
'https://sp.example.org/my-sp'
,
// sp contains the string ".example.org"
'metadata-set'
=>
'saml20-sp-remote'
,
),
'UserID'
=>
'jdoe'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment