ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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\AbstractBaseTestCase
 setUp ()
 @inheritDoc More...
 
- Protected Attributes inherited from ILIAS\HTTP\AbstractBaseTestCase
MockObject $request_interface
 

Detailed Description

Definition at line 29 of file SuperGlobalDropInReplacementTest.php.

Member Function Documentation

◆ getRefinery()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::getRefinery ( )
private

Definition at line 31 of file SuperGlobalDropInReplacementTest.php.

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

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 47 of file SuperGlobalDropInReplacementTest.php.

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

References ILIAS\HTTP\SuperGlobalDropInReplacementTest\getRefinery().

+ Here is the call graph for this function:

◆ testValueCanBeAssignedIfSuperGlobalIsMutable()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::testValueCanBeAssignedIfSuperGlobalIsMutable ( )

Definition at line 39 of file SuperGlobalDropInReplacementTest.php.

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

References ILIAS\HTTP\SuperGlobalDropInReplacementTest\getRefinery().

+ Here is the call graph for this function:

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