ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 ()
 
- Protected Attributes inherited from ILIAS\HTTP\AbstractBaseTestCase
 $request_interface
 

Detailed Description

Definition at line 27 of file SuperGlobalDropInReplacementTest.php.

Member Function Documentation

◆ getRefinery()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::getRefinery ( )
private

Definition at line 29 of file SuperGlobalDropInReplacementTest.php.

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

29  : Refinery
30  {
31  return new Refinery(
32  new DataFactory(),
33  $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock()
34  );
35  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ testExceptionIsRaisedIfValueIsAssignedButSuperGlobalIsImmutable()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::testExceptionIsRaisedIfValueIsAssignedButSuperGlobalIsImmutable ( )

Definition at line 45 of file SuperGlobalDropInReplacementTest.php.

References ILIAS\HTTP\SuperGlobalDropInReplacementTest\getRefinery().

45  : void
46  {
47  $this->expectException(OutOfBoundsException::class);
48 
49  $super_global = new SuperGlobalDropInReplacement($this->getRefinery(), ['foo' => 'bar'], true);
50  $super_global['foo'] = 'phpunit';
51  }
+ Here is the call graph for this function:

◆ testValueCanBeAssignedIfSuperGlobalIsMutable()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::testValueCanBeAssignedIfSuperGlobalIsMutable ( )

Definition at line 37 of file SuperGlobalDropInReplacementTest.php.

References ILIAS\HTTP\SuperGlobalDropInReplacementTest\getRefinery().

37  : void
38  {
39  $super_global = new SuperGlobalDropInReplacement($this->getRefinery(), ['foo' => 'bar']);
40  $super_global['foo'] = 'phpunit';
41 
42  self::assertEquals('phpunit', $super_global['foo']);
43  }
+ Here is the call graph for this function:

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