Skip to content

Commit

Permalink
Test for overruling Asset.timestamp when generating script URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLuckers committed Dec 13, 2017
1 parent 1e5f728 commit ed4ea82
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/TestCase/View/Helper/UrlHelperTest.php
Expand Up @@ -327,6 +327,20 @@ public function testScriptTimestampForce()
$this->assertRegExp('/' . preg_quote(Configure::read('App.jsBaseUrl') . 'script.js?', '/') . '[0-9]+/', $result);
}

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

$result = $this->Helper->script('script.js', ['timestamp' => $timestamp]);
$this->assertEquals(Configure::read('App.jsBaseUrl').'script.js', $result);
}

/**
* test image()
*
Expand Down

0 comments on commit ed4ea82

Please sign in to comment.