ILIAS  release_8 Revision v8.24
ILIAS\HTTP\SuperGlobalDropInReplacementTest Class Reference
+ Inheritance diagram for ILIAS\HTTP\SuperGlobalDropInReplacementTest:
+ Collaboration diagram for ILIAS\HTTP\SuperGlobalDropInReplacementTest:

Public Member Functions

 testValueCanBeAssignedIfSuperGlobalIsMutable ()
 
 testExceptionIsRaisedIfValueIsAssignedButSuperGlobalIsImmutable ()
 

Private Member Functions

 getRefinery ()
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\HTTP\AbstractBaseTest
 setUp ()
 @inheritDoc More...
 
- Protected Attributes inherited from ILIAS\HTTP\AbstractBaseTest
 $request_interface
 

Detailed Description

Definition at line 30 of file SuperGlobalDropInReplacementTest.php.

Member Function Documentation

◆ getRefinery()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::getRefinery ( )
private

Definition at line 32 of file SuperGlobalDropInReplacementTest.php.

32 : Refinery
33 {
34 return new Refinery(
35 new DataFactory(),
36 $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock()
37 );
38 }

Referenced by ILIAS\HTTP\SuperGlobalDropInReplacementTest\testExceptionIsRaisedIfValueIsAssignedButSuperGlobalIsImmutable(), and ILIAS\HTTP\SuperGlobalDropInReplacementTest\testValueCanBeAssignedIfSuperGlobalIsMutable().

+ Here is the caller graph for this function:

◆ testExceptionIsRaisedIfValueIsAssignedButSuperGlobalIsImmutable()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::testExceptionIsRaisedIfValueIsAssignedButSuperGlobalIsImmutable ( )

Definition at line 48 of file SuperGlobalDropInReplacementTest.php.

48 : void
49 {
50 $this->expectException(OutOfBoundsException::class);
51
52 $super_global = new SuperGlobalDropInReplacement($this->getRefinery(), ['foo' => 'bar'], true);
53 $super_global['foo'] = 'phpunit';
54 }

References ILIAS\HTTP\SuperGlobalDropInReplacementTest\getRefinery().

+ Here is the call graph for this function:

◆ testValueCanBeAssignedIfSuperGlobalIsMutable()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::testValueCanBeAssignedIfSuperGlobalIsMutable ( )

Definition at line 40 of file SuperGlobalDropInReplacementTest.php.

40 : void
41 {
42 $super_global = new SuperGlobalDropInReplacement($this->getRefinery(), ['foo' => 'bar']);
43 $super_global['foo'] = 'phpunit';
44
45 self::assertEquals('phpunit', $super_global['foo']);
46 }

References ILIAS\HTTP\SuperGlobalDropInReplacementTest\getRefinery().

+ Here is the call graph for this function:

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