ILIAS  release_8 Revision v8.24
ilServicesAuthShibbolethTest Class Reference
+ Inheritance diagram for ilServicesAuthShibbolethTest:
+ Collaboration diagram for ilServicesAuthShibbolethTest:

Public Member Functions

 testRuleAssignement ()
 
 testWildcardRuleAssignement ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Private Attributes

ILIAS DI Container $dic_backup
 

Detailed Description

Definition at line 22 of file ilServicesAuthShibbolethTest.php.

Member Function Documentation

◆ setUp()

ilServicesAuthShibbolethTest::setUp ( )
protected

Definition at line 26 of file ilServicesAuthShibbolethTest.php.

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

References $DIC.

◆ tearDown()

ilServicesAuthShibbolethTest::tearDown ( )
protected

Definition at line 35 of file ilServicesAuthShibbolethTest.php.

35 : void
36 {
37 global $DIC;
39 }

References $DIC, and $dic_backup.

◆ testRuleAssignement()

ilServicesAuthShibbolethTest::testRuleAssignement ( )

Definition at line 41 of file ilServicesAuthShibbolethTest.php.

41 : void
42 {
44 $rule->setName('attribute_1');
45 $rule->setValue('value_1');
46
47 $this->assertTrue($rule->matches(['attribute_1' => 'value_1']));
48 $this->assertFalse($rule->matches(['attribute_2' => 'value_2']));
49 }

◆ testWildcardRuleAssignement()

ilServicesAuthShibbolethTest::testWildcardRuleAssignement ( )

Definition at line 51 of file ilServicesAuthShibbolethTest.php.

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

Field Documentation

◆ $dic_backup

ILIAS DI Container ilServicesAuthShibbolethTest::$dic_backup
private

Definition at line 24 of file ilServicesAuthShibbolethTest.php.

Referenced by tearDown().


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