Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Feb 19, 2020
1 parent 7cdaa05 commit aa07206
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 14 deletions.
4 changes: 4 additions & 0 deletions tests/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
*/
$config = [
'baseurlpath' => '/',
'tempdir' => '/tmp/simplesaml',
'loggingdir' => '/tmp/simplesaml',
'secretsalt' => 'salty',

'metadata.sources' => [
['type' => 'flatfile', 'directory' => dirname(__DIR__) . '/metadata'],
],

'module.enable' => [
'casserver' => true,
'exampleauth' => true
],

Expand Down
2 changes: 1 addition & 1 deletion www/loggedIn.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

$globalConfig = \SimpleSAML\Configuration::getInstance();

$t = new \SimpleSAML\XHTML\Template($globalConfig, 'casserver:loggedIn.php');
$t = new \SimpleSAML\XHTML\Template($globalConfig, 'casserver:loggedIn.twig');

$t->send();
2 changes: 1 addition & 1 deletion www/loggedOut.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

$globalConfig = \SimpleSAML\Configuration::getInstance();

$t = new \SimpleSAML\XHTML\Template($globalConfig, 'casserver:loggedOut.php');
$t = new \SimpleSAML\XHTML\Template($globalConfig, 'casserver:loggedOut.twig');

if (array_key_exists('url', $_GET)) {
$t->data['url'] = $_GET['url'];
Expand Down
4 changes: 2 additions & 2 deletions www/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@
}

$ticketStoreConfig = $casconfig->getValue('ticketstore', ['class' => 'casserver:FileSystemTicketStore']);
$ticketStoreClass = Module::resolveClass($ticketStoreConfig['class'], 'Cas_Ticket');
$ticketStoreClass = Module::resolveClass($ticketStoreConfig['class'], 'Cas\Ticket');
/** @var $ticketStore TicketStore */
/** @psalm-suppress InvalidStringClass */
$ticketStore = new $ticketStoreClass($casconfig);

$ticketFactoryClass = Module::resolveClass('casserver:TicketFactory', 'Cas_Ticket');
$ticketFactoryClass = Module::resolveClass('casserver:TicketFactory', 'Cas\Ticket');
/** @var $ticketFactory TicketFactory */
/** @psalm-suppress InvalidStringClass */
$ticketFactory = new $ticketFactoryClass($casconfig);
Expand Down
2 changes: 1 addition & 1 deletion www/logout.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

if (!is_null($session)) {
$ticketStoreConfig = $casconfig->getValue('ticketstore', ['class' => 'casserver:FileSystemTicketStore']);
$ticketStoreClass = \SimpleSAML\Module::resolveClass($ticketStoreConfig['class'], 'Cas_Ticket');
$ticketStoreClass = \SimpleSAML\Module::resolveClass($ticketStoreConfig['class'], 'Cas\Ticket');
/** @psalm-suppress InvalidStringClass */
$ticketStore = new $ticketStoreClass($casconfig);

Expand Down
6 changes: 3 additions & 3 deletions www/proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
$casconfig = \SimpleSAML\Configuration::getConfig('module_casserver.php');

/* Instantiate protocol handler */
$protocolClass = \SimpleSAML\Module::resolveClass('casserver:Cas20', 'Cas_Protocol');
$protocolClass = \SimpleSAML\Module::resolveClass('casserver:Cas20', 'Cas\Protocol');
/** @psalm-suppress InvalidStringClass */
$protocol = new $protocolClass($casconfig);

Expand All @@ -41,11 +41,11 @@
checkServiceURL(sanitize($_GET['targetService']), $legal_target_service_urls) && array_key_exists('pgt', $_GET)
) {
$ticketStoreConfig = $casconfig->getValue('ticketstore', ['class' => 'casserver:FileSystemTicketStore']);
$ticketStoreClass = \SimpleSAML\Module::resolveClass($ticketStoreConfig['class'], 'Cas_Ticket');
$ticketStoreClass = \SimpleSAML\Module::resolveClass($ticketStoreConfig['class'], 'Cas\Ticket');
/** @psalm-suppress InvalidStringClass */
$ticketStore = new $ticketStoreClass($casconfig);

$ticketFactoryClass = \SimpleSAML\Module::resolveClass('casserver:TicketFactory', 'Cas_Ticket');
$ticketFactoryClass = \SimpleSAML\Module::resolveClass('casserver:TicketFactory', 'Cas\Ticket');
/** @psalm-suppress InvalidStringClass */
$ticketFactory = new $ticketFactoryClass($casconfig);

Expand Down
6 changes: 3 additions & 3 deletions www/utility/validateTicket.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
$casconfig = \SimpleSAML\Configuration::getConfig('module_casserver.php');

/* Instantiate protocol handler */
$protocolClass = \SimpleSAML\Module::resolveClass('casserver:Cas20', 'Cas_Protocol');
$protocolClass = \SimpleSAML\Module::resolveClass('casserver:Cas20', 'Cas\Protocol');
/** @var Cas20 $protocol */
/** @psalm-suppress InvalidStringClass */
$protocol = new $protocolClass($casconfig);
Expand All @@ -48,12 +48,12 @@

try {
$ticketStoreConfig = $casconfig->getValue('ticketstore', ['class' => 'casserver:FileSystemTicketStore']);
$ticketStoreClass = \SimpleSAML\Module::resolveClass($ticketStoreConfig['class'], 'Cas_Ticket');
$ticketStoreClass = \SimpleSAML\Module::resolveClass($ticketStoreConfig['class'], 'Cas\Ticket');
/** @var TicketStore $ticketStore */
/** @psalm-suppress InvalidStringClass */
$ticketStore = new $ticketStoreClass($casconfig);

$ticketFactoryClass = SimpleSAML\Module::resolveClass('casserver:TicketFactory', 'Cas_Ticket');
$ticketFactoryClass = SimpleSAML\Module::resolveClass('casserver:TicketFactory', 'Cas\Ticket');
/** @var TicketFactory $ticketFactory */
/** @psalm-suppress InvalidStringClass */
$ticketFactory = new $ticketFactoryClass($casconfig);
Expand Down
6 changes: 3 additions & 3 deletions www/validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
$casconfig = \SimpleSAML\Configuration::getConfig('module_casserver.php');

/* Instantiate protocol handler */
$protocolClass = \SimpleSAML\Module::resolveClass('casserver:Cas10', 'Cas_Protocol');
$protocolClass = \SimpleSAML\Module::resolveClass('casserver:Cas10', 'Cas\Protocol');
/** @psalm-suppress InvalidStringClass */
$protocol = new $protocolClass($casconfig);

Expand All @@ -42,11 +42,11 @@
try {
/* Instantiate ticket store */
$ticketStoreConfig = $casconfig->getValue('ticketstore', ['class' => 'casserver:FileSystemTicketStore']);
$ticketStoreClass = \SimpleSAML\Module::resolveClass($ticketStoreConfig['class'], 'Cas_Ticket');
$ticketStoreClass = \SimpleSAML\Module::resolveClass($ticketStoreConfig['class'], 'Cas\Ticket');
/** @psalm-suppress InvalidStringClass */
$ticketStore = new $ticketStoreClass($casconfig);

$ticketFactoryClass = \SimpleSAML\Module::resolveClass('casserver:TicketFactory', 'Cas_Ticket');
$ticketFactoryClass = \SimpleSAML\Module::resolveClass('casserver:TicketFactory', 'Cas\Ticket');
/** @psalm-suppress InvalidStringClass */
$ticketFactory = new $ticketFactoryClass($casconfig);

Expand Down

0 comments on commit aa07206

Please sign in to comment.