ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
InitHttpServicesTest.php
Go to the documentation of this file.
1 <?php
2 
3 require_once("libs/composer/vendor/autoload.php");
4 
6 
7 class InitHttpServicesTest extends TestCase
8 {
12  protected $dic;
13 
17  protected function setUp(): void
18  {
19  $this->dic = new \ILIAS\DI\Container();
20  }
21 
22  public function testUIFrameworkInitialization(): void
23  {
24  $this->assertFalse(isset($this->dic['http']));
25  $this->assertFalse(isset($this->dic['http.response_sender_strategy']));
26  $this->assertFalse(isset($this->dic['http.cookie_jar_factory']));
27  $this->assertFalse(isset($this->dic['http.request_factory']));
28  $this->assertFalse(isset($this->dic['http.response_factory']));
29  (new \InitHttpServices())->init($this->dic);
30  $this->assertInstanceOf("ILIAS\HTTP\Services", $this->dic->http());
31  $this->assertTrue(isset($this->dic['http']));
32  $this->assertTrue(isset($this->dic['http.response_sender_strategy']));
33  $this->assertTrue(isset($this->dic['http.cookie_jar_factory']));
34  $this->assertTrue(isset($this->dic['http.request_factory']));
35  $this->assertTrue(isset($this->dic['http.response_factory']));
36  }
37 }
setUp()
Http services has no additional deps so far to be set up.