ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
InitHttpServicesTest Class Reference

InitHttpServices is the backport bridge that still populates the legacy container for components which have not moved to the bootstrap yet, so what it puts into that container is what this covers. More...

+ Inheritance diagram for InitHttpServicesTest:
+ Collaboration diagram for InitHttpServicesTest:

Public Member Functions

 testTheContainerOnlyHoldsTheServiceAfterInit (string $service)
 
 testTheLegacyHttpKeyResolvesToTheSameStateAsTheInterface ()
 
 testHttpIsReachableThroughTheContainerAccessor ()
 

Static Public Member Functions

static servicesItRegisters ()
 

Protected Member Functions

 setUp ()
 

Private Attributes

Container $dic
 

Detailed Description

InitHttpServices is the backport bridge that still populates the legacy container for components which have not moved to the bootstrap yet, so what it puts into that container is what this covers.

Definition at line 37 of file InitHttpServicesTest.php.

Member Function Documentation

◆ servicesItRegisters()

static InitHttpServicesTest::servicesItRegisters ( )
static
Returns
array<string, array{class-string}>

Definition at line 49 of file InitHttpServicesTest.php.

49 : array
50 {
51 return [
52 'request factory' => [RequestFactory::class],
53 'response factory' => [ResponseFactory::class],
54 'cookie jar factory' => [CookieJarFactory::class],
55 'response sender strategy' => [ResponseSenderStrategy::class],
56 'duration factory' => [DurationFactory::class],
57 'http state' => [GlobalHttpState::class],
58 ];
59 }

◆ setUp()

InitHttpServicesTest::setUp ( )
protected

Definition at line 41 of file InitHttpServicesTest.php.

41 : void
42 {
43 $this->dic = new Container();
44 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:38

◆ testHttpIsReachableThroughTheContainerAccessor()

InitHttpServicesTest::testHttpIsReachableThroughTheContainerAccessor ( )

Definition at line 80 of file InitHttpServicesTest.php.

80 : void
81 {
82 (new InitHttpServices())->init($this->dic);
83
84 $this->assertInstanceOf(Services::class, $this->dic->http());
85 }

References init().

+ Here is the call graph for this function:

◆ testTheContainerOnlyHoldsTheServiceAfterInit()

InitHttpServicesTest::testTheContainerOnlyHoldsTheServiceAfterInit ( string  $service)

Definition at line 62 of file InitHttpServicesTest.php.

62 : void
63 {
64 $this->assertFalse(isset($this->dic[$service]));
65
66 (new InitHttpServices())->init($this->dic);
67
68 $this->assertTrue(isset($this->dic[$service]));
69 $this->assertInstanceOf($service, $this->dic[$service]);
70 }
$service
Definition: ltiresult.php:44

References $service, and init().

+ Here is the call graph for this function:

◆ testTheLegacyHttpKeyResolvesToTheSameStateAsTheInterface()

InitHttpServicesTest::testTheLegacyHttpKeyResolvesToTheSameStateAsTheInterface ( )

Definition at line 72 of file InitHttpServicesTest.php.

72 : void
73 {
74 (new InitHttpServices())->init($this->dic);
75
76 $this->assertInstanceOf(Services::class, $this->dic['http']);
77 $this->assertSame($this->dic[GlobalHttpState::class], $this->dic['http']);
78 }

References init().

+ Here is the call graph for this function:

Field Documentation

◆ $dic

Container InitHttpServicesTest::$dic
private

Definition at line 39 of file InitHttpServicesTest.php.


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