Skip to content

Commit

Permalink
Check if a generated image url has a timestamp when Asset.timestamp
Browse files Browse the repository at this point in the history
… = force.
  • Loading branch information
JoshuaLuckers committed Dec 13, 2017
1 parent 3e59650 commit ae2c199
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/TestCase/View/Helper/UrlHelperTest.php
Expand Up @@ -342,6 +342,19 @@ public function testImage()
$this->assertEquals('CID:foo.jpg', $result);
}

/**
* Test image with `Asset.timestamp` = force
*
* @return void
*/
public function testImageTimestampForce()
{
Configure::write('Asset.timestamp', 'force');

$result = $this->Helper->image('cake.icon.png');
$this->assertRegExp('/' . preg_quote('img/cake.icon.png?', '/') . '[0-9]+/', $result);
}

/**
* test css
*
Expand Down

0 comments on commit ae2c199

Please sign in to comment.