Class InitCtrlServiceTest.
More...
◆ testCtrlServiceInitializationSuccess()
InitCtrlServiceTest::testCtrlServiceInitializationSuccess |
( |
| ) |
|
Definition at line 67 of file InitCtrlServiceTest.php.
67 : void
68 {
70 $dic[
'refinery'] = $this->createMock(Refinery::class);
71
72 $dic[
'http.response_sender_strategy'] = $this->createMock(DefaultResponseSenderStrategy::class);
73 $dic[
'http'] = $this->createMock(HttpService::class);
75 ->method('request')
76 ->willReturn(
77 $this->createMock(ServerRequestInterface::class)
78 );
79 $dic[
'component.factory'] = $this->createMock(ilComponentFactory::class);
80
81 $this->assertFalse(isset(
$dic[
'ilCtrl']));
82
84
85 $this->assertTrue(isset(
$dic[
'ilCtrl']));
86 $this->assertInstanceOf(
87 ilCtrlInterface::class,
89 );
90 }
Customizing of pimple-DIC for ILIAS.
Class InitCtrlService wraps the initialization of ilCtrl.
References $dic, and init().
◆ testCtrlServiceInitializationWithoutHttpServices()
InitCtrlServiceTest::testCtrlServiceInitializationWithoutHttpServices |
( |
| ) |
|
Definition at line 45 of file InitCtrlServiceTest.php.
45 : void
46 {
48
49 $dic[
'refinery'] = $this->createMock(Refinery::class);
50
51 $this->expectException(ilCtrlException::class);
52 $this->expectExceptionMessage("Cannot initialize ilCtrl if HTTP Services are not yet available.");
54 }
References $dic, and init().
◆ testCtrlServiceInitializationWithoutRefinery()
InitCtrlServiceTest::testCtrlServiceInitializationWithoutRefinery |
( |
| ) |
|
Definition at line 34 of file InitCtrlServiceTest.php.
34 : void
35 {
37
38 $dic[
'http'] = $this->createMock(HttpService::class);
39
40 $this->expectException(ilCtrlException::class);
41 $this->expectExceptionMessage("Cannot initialize ilCtrl if Refinery Factory is not yet available.");
43 }
References $dic, and init().
The documentation for this class was generated from the following file: