Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function testToHtml() |
||
13 | { |
||
14 | $serviceProvidersNames = Discovery::getInstance()->get(ServiceProviderInterface::class); |
||
15 | $serviceProviders = \array_map(function(string $className) { |
||
16 | return new $className(); |
||
17 | }, $serviceProvidersNames); |
||
18 | $container = new Container($serviceProviders); |
||
19 | $container->set('ROOT_URL', '/foo/bar'); |
||
20 | |||
21 | /* @var WebLibraryManager $webLibraryManager */ |
||
22 | $webLibraryManager = $container->get(WebLibraryManager::class); |
||
23 | \ob_start(); |
||
24 | $webLibraryManager->toHtml(); |
||
25 | $content = \ob_get_clean(); |
||
26 | |||
27 | $this->assertSame('<script type="text/javascript"> |
||
28 | window.rootUrl = "\/foo\/bar"</script> |
||
29 | ', $content); |
||
30 | } |
||
31 | } |
||
32 |