ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
InitHttpServicesTest.php
Go to the documentation of this file.
1<?php
2
19require_once("vendor/composer/vendor/autoload.php");
20
21use PHPUnit\Framework\TestCase;
22
23class InitHttpServicesTest extends TestCase
24{
28 protected $dic;
29
33 protected function setUp(): void
34 {
35 $this->dic = new \ILIAS\DI\Container();
36 }
37
38 public function testUIFrameworkInitialization(): void
39 {
40 $this->assertFalse(isset($this->dic['http']));
41 $this->assertFalse(isset($this->dic['http.response_sender_strategy']));
42 $this->assertFalse(isset($this->dic['http.cookie_jar_factory']));
43 $this->assertFalse(isset($this->dic['http.request_factory']));
44 $this->assertFalse(isset($this->dic['http.response_factory']));
45 (new \InitHttpServices())->init($this->dic);
46 $this->assertInstanceOf("ILIAS\HTTP\Services", $this->dic->http());
47 $this->assertTrue(isset($this->dic['http']));
48 $this->assertTrue(isset($this->dic['http.response_sender_strategy']));
49 $this->assertTrue(isset($this->dic['http.cookie_jar_factory']));
50 $this->assertTrue(isset($this->dic['http.request_factory']));
51 $this->assertTrue(isset($this->dic['http.response_factory']));
52 }
53}
setUp()
Http services has no additional deps so far to be set up.