Skip to content

Commit

Permalink
adding a test for the yet untested javascript protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Aug 1, 2012
1 parent f0ffe09 commit 2a674fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
Expand Up @@ -338,6 +338,10 @@ public function testLink() {
$expected = array('a' => array('href' => 'http://www.example.org?param1=value1&param2=value2'), 'http://www.example.org?param1=value1&param2=value2', '/a');
$this->assertTags($result, $expected);

$result = $this->Html->link('alert', 'javascript:alert(\'cakephp\');');
$expected = array('a' => array('href' => 'javascript:alert('cakephp');'), 'alert', '/a');
$this->assertTags($result, $expected);

$result = $this->Html->link('write me', 'mailto:example@cakephp.org');
$expected = array('a' => array('href' => 'mailto:example@cakephp.org'), 'write me', '/a');
$this->assertTags($result, $expected);
Expand Down

0 comments on commit 2a674fc

Please sign in to comment.