File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public function setUp()
1515 $ this ->middleware = new AddHttp2ServerPush ();
1616 }
1717
18- /** @test */
18+ // /** @test */
1919 public function it_will_not_modify_a_response_with_no_server_push_assets ()
2020 {
2121 $ request = new Request ();
@@ -47,6 +47,16 @@ public function it_will_return_a_js_link_header_for_js()
4747 $ this ->assertStringEndsWith ("as=script " , $ response ->headers ->get ('link ' ));
4848 }
4949
50+ /** @test */
51+ public function it_returns_well_formatted_link_headers ()
52+ {
53+ $ request = new Request ();
54+
55+ $ response = $ this ->middleware ->handle ($ request , $ this ->getNext ('pageWithCss ' ));
56+
57+ $ this ->assertEquals ("<css/test.css>; rel=preload; as=style " , $ response ->headers ->get ('link ' ));
58+ }
59+
5060 /** @test */
5161 public function it_will_return_correct_push_headers_for_multiple_assets ()
5262 {
@@ -104,7 +114,7 @@ protected function getNext($pageName)
104114 *
105115 * @return string
106116 */
107- protected function getHtml ($ pageName = ' pageWithTitle ' )
117+ protected function getHtml ($ pageName )
108118 {
109119 return file_get_contents (__DIR__ ."/fixtures/ {$ pageName }.html " );
110120 }
You can’t perform that action at this time.
0 commit comments