Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding a test for the yet untested javascript protocol

  • Loading branch information...
commit 2a674fc461b0d2a80a9af6948129dcf41d2644e4 1 parent f0ffe09
Mark S. dereuromark authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
4 lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
View
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.