ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
- 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.

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

32  : Refinery
33  {
34  return new Refinery(
35  new DataFactory(),
36  $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock()
37  );
38  }
+ Here is the caller graph for this function:

◆ testExceptionIsRaisedIfValueIsAssignedButSuperGlobalIsImmutable()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::testExceptionIsRaisedIfValueIsAssignedButSuperGlobalIsImmutable ( )

Definition at line 48 of file SuperGlobalDropInReplacementTest.php.

References ILIAS\HTTP\SuperGlobalDropInReplacementTest\getRefinery().

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  }
+ Here is the call graph for this function:

◆ testValueCanBeAssignedIfSuperGlobalIsMutable()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::testValueCanBeAssignedIfSuperGlobalIsMutable ( )

Definition at line 40 of file SuperGlobalDropInReplacementTest.php.

References ILIAS\HTTP\SuperGlobalDropInReplacementTest\getRefinery().

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  }
+ Here is the call graph for this function:

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