Skip to content

Commit

Permalink
Test for overruling Asset.timestamp when generating assetUrls.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLuckers committed Dec 12, 2017
1 parent 3bc8caa commit 2cf26fa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/TestCase/View/Helper/UrlHelperTest.php
Expand Up @@ -254,6 +254,16 @@ public function testAssetUrlTimestampForce()
$this->assertRegExp('/' . preg_quote(Configure::read('App.cssBaseUrl') . 'cake.generic.css?', '/') . '[0-9]+/', $result);
}

public function testAssetTimestampConfigureOverride()
{
$this->Helper->webroot = '';
Configure::write('Asset.timestamp', 'force');
$timestamp = false;

$result = $this->Helper->assetTimestamp(Configure::read('App.cssBaseUrl') . 'cake.generic.css', $timestamp);
$this->assertEquals(Configure::read('App.cssBaseUrl') . 'cake.generic.css', $result);
}

/**
* test assetTimestamp with plugins and themes
*
Expand Down

0 comments on commit 2cf26fa

Please sign in to comment.