mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Additional path and extension tests for JavascriptHelper::link()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6434 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
241bda262a
commit
abd94bc068
1 changed files with 12 additions and 0 deletions
|
@ -84,6 +84,18 @@ class JavascriptTest extends UnitTestCase {
|
|||
$result = $this->Javascript->link('/plugin/js/jquery-1.1.2');
|
||||
$expected = '<script type="text/javascript" src="/plugin/js/jquery-1.1.2.js"></script>';
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->Javascript->link('/some_other_path/myfile.1.2.2.min.js');
|
||||
$expected = '<script type="text/javascript" src="/some_other_path/myfile.1.2.2.min.js"></script>';
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->Javascript->link('some_other_path/myfile.1.2.2.min.js');
|
||||
$expected = '<script type="text/javascript" src="js/some_other_path/myfile.1.2.2.min.js"></script>';
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $this->Javascript->link('some_other_path/myfile.1.2.2.min');
|
||||
$expected = '<script type="text/javascript" src="js/some_other_path/myfile.1.2.2.min.js"></script>';
|
||||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
|
||||
function testObjectGeneration() {
|
||||
|
|
Loading…
Add table
Reference in a new issue