Skip to content

Commit 9115753

Browse files
author
Tom Schlick
committed
add test for external resources
1 parent c385d19 commit 9115753

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/HttpPushTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@ public function test_add_resources_to_queue()
3939
$this->assertEquals($expected, $this->instance->resources);
4040
}
4141

42+
public function test_add_external_resources_to_queue()
43+
{
44+
$this->instance->queueResource('https://example.com/style.css', 'style');
45+
46+
$expected = [
47+
[
48+
'path' => 'https://example.com/style.css',
49+
'type' => 'style',
50+
],
51+
];
52+
$this->assertEquals($expected, $this->instance->resources);
53+
}
54+
4255
public function test_resource_generates_link_string()
4356
{
4457
$this->instance->queueResource('/assets/app.js.min', 'script');

0 commit comments

Comments
 (0)