Skip to content

Commit

Permalink
Test for overruling Asset.timestamp when generating image URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLuckers committed Dec 13, 2017
1 parent ae2c199 commit 09292b3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/TestCase/View/Helper/UrlHelperTest.php
Expand Up @@ -355,6 +355,20 @@ public function testImageTimestampForce()
$this->assertRegExp('/' . preg_quote('img/cake.icon.png?', '/') . '[0-9]+/', $result);
}

/**
* Test image with timestamp option overriding `Asset.timestamp` in Configure
*
* @return void
*/
public function testImageTimestampConfigureOverride()
{
Configure::write('Asset.timestamp', 'force');
$timestamp = false;

$result = $this->Helper->image('cake.icon.png', ['timestamp' => $timestamp]);
$this->assertEquals('img/cake.icon.png', $result);
}

/**
* test css
*
Expand Down

0 comments on commit 09292b3

Please sign in to comment.