Skip to content

Commit

Permalink
Coverage Support
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Jul 5, 2019
1 parent a319442 commit b248678
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/DispatchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ public function testWebpReplacements()

$request = Request::create(ResourceManager::resources()->getResourceUri('css/webptest.css'));
$response = $dispatch->handleRequest($request);
$this->assertContains('url(http://assets.packaged.in/r/30c60da9f504/img/test-sample.png)', $response->getContent());
$this->assertContains('url(http://assets.packaged.in/r/30c60da9f504/img/test-sample.png?abc=def#xyz)', $response->getContent());
$this->assertNotContains(
'url(http://assets.packaged.in/r/30c60da9f504/img/test-sample.png.webp)',
'url(http://assets.packaged.in/r/30c60da9f504/img/test-sample.png.webp?abc=def#xyz)',
$response->getContent()
);

Expand All @@ -173,11 +173,11 @@ public function testWebpReplacements()
$response = $dispatch->handleRequest($request);

$this->assertNotContains(
'url(http://assets.packaged.in/r/30c60da9f504-1/img/test-sample.png)',
'url(http://assets.packaged.in/r/30c60da9f504-1/img/test-sample.png?abc=def#xyz)',
$response->getContent()
);
$this->assertContains(
'url(http://assets.packaged.in/r/d6e2937fee66-1/img/test-sample.png.webp)',
'url(http://assets.packaged.in/r/d6e2937fee66-1/img/test-sample.png.webp?abc=def#xyz)',
$response->getContent()
);

Expand Down
2 changes: 1 addition & 1 deletion tests/_root/resources/css/webptest.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
body {
background: yellow url(../img/test-sample.png);
background: yellow url(../img/test-sample.png?abc=def#xyz);
}

0 comments on commit b248678

Please sign in to comment.