ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilServicesAuthShibbolethTest Class Reference
+ Inheritance diagram for ilServicesAuthShibbolethTest:
+ Collaboration diagram for ilServicesAuthShibbolethTest:

Public Member Functions

 testRuleAssignement ()
 
 testWildcardRuleAssignement ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Private Attributes

Container $dic_backup
 

Detailed Description

Definition at line 24 of file ilServicesAuthShibbolethTest.php.

Member Function Documentation

◆ setUp()

ilServicesAuthShibbolethTest::setUp ( )
protected

Definition at line 28 of file ilServicesAuthShibbolethTest.php.

28 : void
29 {
30 global $DIC;
31 $this->dic_backup = is_object($DIC) ? clone $DIC : $DIC;
32
33 $DIC = new Container();
34 $DIC['ilDB'] = $this->createMock(ilDBInterface::class);
35 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
global $DIC
Definition: shib_login.php:26

References $DIC.

◆ tearDown()

ilServicesAuthShibbolethTest::tearDown ( )
protected

Definition at line 37 of file ilServicesAuthShibbolethTest.php.

37 : void
38 {
39 global $DIC;
41 }

References $DIC, and $dic_backup.

◆ testRuleAssignement()

ilServicesAuthShibbolethTest::testRuleAssignement ( )

Definition at line 43 of file ilServicesAuthShibbolethTest.php.

43 : void
44 {
46 $rule->setName('attribute_1');
47 $rule->setValue('value_1');
48
49 $this->assertTrue($rule->matches(['attribute_1' => 'value_1']));
50 $this->assertFalse($rule->matches(['attribute_2' => 'value_2']));
51 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ testWildcardRuleAssignement()

ilServicesAuthShibbolethTest::testWildcardRuleAssignement ( )

Definition at line 53 of file ilServicesAuthShibbolethTest.php.

53 : void
54 {
56 $rule->setName('attribute_1');
57 $rule->setValue('value_*');
58
59 $this->assertTrue($rule->matches(['attribute_1' => 'value_1']));
60 $this->assertTrue($rule->matches(['attribute_1' => 'value_2']));
61 $this->assertFalse($rule->matches(['attribute_2' => 'value_2']));
62 }

Field Documentation

◆ $dic_backup

Container ilServicesAuthShibbolethTest::$dic_backup
private

Definition at line 26 of file ilServicesAuthShibbolethTest.php.

Referenced by tearDown().


The documentation for this class was generated from the following file: