Skip to content
Snippets Groups Projects
Commit c6ac4bef authored by Patrick Radtke's avatar Patrick Radtke
Browse files

Split TestableAuthorize into seperate file

parent 435c438e
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
namespace SimpleSAML\Test\Module\consent\Auth\Process; namespace SimpleSAML\Test\Module\consent\Auth\Process;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use SimpleSAML\Module\authorize\Auth\Process\Authorize;
use SimpleSAML\Utils\Attributes; use SimpleSAML\Utils\Attributes;
class AuthorizeTest extends TestCase class AuthorizeTest extends TestCase
...@@ -161,15 +160,3 @@ class AuthorizeTest extends TestCase ...@@ -161,15 +160,3 @@ class AuthorizeTest extends TestCase
]; ];
} }
} }
// phpcs:ignore
class TestableAuthorize extends Authorize
{
/**
* Override the redirect behavior since its difficult to test
* @param array $request the state
*/
protected function unauthorized(&$request)
{
$request['NOT_AUTHORIZED'] = true;
}
}
<?php
/**
* Subclass authorize filter to make it unit testable.
*/
namespace SimpleSAML\Test\Module\consent\Auth\Process;
use SimpleSAML\Module\authorize\Auth\Process\Authorize;
class TestableAuthorize extends Authorize
{
/**
* Override the redirect behavior since its difficult to test
* @param array $request the state
*/
protected function unauthorized(&$request)
{
$request['NOT_AUTHORIZED'] = true;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment