ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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
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.

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

31  : Refinery
32  {
33  return new Refinery(
34  new DataFactory(),
35  $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock()
36  );
37  }
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 47 of file SuperGlobalDropInReplacementTest.php.

References ILIAS\HTTP\SuperGlobalDropInReplacementTest\getRefinery().

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

◆ testValueCanBeAssignedIfSuperGlobalIsMutable()

ILIAS\HTTP\SuperGlobalDropInReplacementTest::testValueCanBeAssignedIfSuperGlobalIsMutable ( )

Definition at line 39 of file SuperGlobalDropInReplacementTest.php.

References ILIAS\HTTP\SuperGlobalDropInReplacementTest\getRefinery().

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

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