Skip to content

Commit

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

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

$result = $this->Helper->css('cake.generic', ['timestamp' => $timestamp]);
$this->assertEquals('css/cake.generic.css', $result);
}

/**
* Test generating paths with webroot().
*
Expand Down

0 comments on commit 2c6a4e6

Please sign in to comment.