Class InitCtrlServiceTest.
More...
◆ testCtrlServiceInitializationSuccess()
| InitCtrlServiceTest::testCtrlServiceInitializationSuccess |
( |
| ) |
|
Definition at line 53 of file InitCtrlServiceTest.php.
53 : void
54 {
56 $dic[
'refinery'] = $this->createMock(Refinery::class);
57
58 $dic[
'http.response_sender_strategy'] = $this->createMock(DefaultResponseSenderStrategy::class);
59 $dic[
'http'] = $this->createMock(HttpService::class);
61 ->method('request')
62 ->willReturn(
63 $this->createMock(ServerRequestInterface::class)
64 );
65 $dic[
'component.factory'] = $this->createMock(ilComponentFactory::class);
66
67 $this->assertFalse(isset(
$dic[
'ilCtrl']));
68
70
71 $this->assertTrue(isset(
$dic[
'ilCtrl']));
72 $this->assertInstanceOf(
73 ilCtrlInterface::class,
75 );
76 }
Customizing of pimple-DIC for ILIAS.
Class InitCtrlService wraps the initialization of ilCtrl.
References $dic.
◆ testCtrlServiceInitializationWithoutHttpServices()
| InitCtrlServiceTest::testCtrlServiceInitializationWithoutHttpServices |
( |
| ) |
|
Definition at line 31 of file InitCtrlServiceTest.php.
31 : void
32 {
34
35 $dic[
'refinery'] = $this->createMock(Refinery::class);
36
37 $this->expectException(ilCtrlException::class);
38 $this->expectExceptionMessage("Cannot initialize ilCtrl if HTTP Services are not yet available.");
40 }
References $dic.
◆ testCtrlServiceInitializationWithoutRefinery()
| InitCtrlServiceTest::testCtrlServiceInitializationWithoutRefinery |
( |
| ) |
|
Definition at line 20 of file InitCtrlServiceTest.php.
20 : void
21 {
23
24 $dic[
'http'] = $this->createMock(HttpService::class);
25
26 $this->expectException(ilCtrlException::class);
27 $this->expectExceptionMessage("Cannot initialize ilCtrl if Refinery Factory is not yet available.");
29 }
References $dic.
The documentation for this class was generated from the following file: