-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ccdfb58
commit 4f22a09
Showing
5 changed files
with
65 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: php | ||
php: | ||
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
- hhvm | ||
matrix: | ||
allow_failures: | ||
- php: hhvm | ||
before_script: composer update --dev | ||
script: php vendor/phpunit/phpunit/phpunit.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<phpunit bootstrap="./vendor/autoload.php"> | ||
<testsuites> | ||
<testsuite name="The project's test suite"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
namespace SimpleSAML\Module\authVHO\Auth\Process; | ||
|
||
use SimpleSAML\Module; | ||
use SimpleSAML_Auth_ProcessingFilter; | ||
use SimpleSAML_Auth_State; | ||
use SimpleSAML\Utils; | ||
|
||
/** | ||
* A simple processing filter for testing that redirection works as it should. | ||
* | ||
*/ | ||
class RedirectTest extends SimpleSAML_Auth_ProcessingFilter | ||
{ | ||
/** | ||
* Initialize processing of the redirect test. | ||
* | ||
* @param array &$state The state we should update. | ||
*/ | ||
public function process(&$state) | ||
{ | ||
assert('is_array($state)'); | ||
assert('array_key_exists("Attributes", $state)'); | ||
|
||
// To check whether the state is saved correctly | ||
$state['Attributes']['RedirectTest1'] = array('OK'); | ||
|
||
// Save state and redirect | ||
$id = SimpleSAML_Auth_State::saveState($state, 'authVHO:redirectfilter-test'); | ||
$url = Module::getModuleURL('authVHO/redirecttest.php'); | ||
HTTP::redirectTrustedURL($url, array('StateId' => $id)); | ||
} | ||
} |