Skip to content
This repository
Browse code

adding a test for the yet untested javascript protocol

  • Loading branch information...
commit 2a674fc461b0d2a80a9af6948129dcf41d2644e4 1 parent f0ffe09
Mark authored August 01, 2012
4  lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
@@ -338,6 +338,10 @@ public function testLink() {
338 338
 		$expected = array('a' => array('href' => 'http://www.example.org?param1=value1&param2=value2'), 'http://www.example.org?param1=value1&param2=value2', '/a');
339 339
 		$this->assertTags($result, $expected);
340 340
 
  341
+		$result = $this->Html->link('alert', 'javascript:alert(\'cakephp\');');
  342
+		$expected = array('a' => array('href' => 'javascript:alert('cakephp');'), 'alert', '/a');
  343
+		$this->assertTags($result, $expected);
  344
+
341 345
 		$result = $this->Html->link('write me', 'mailto:example@cakephp.org');
342 346
 		$expected = array('a' => array('href' => 'mailto:example@cakephp.org'), 'write me', '/a');
343 347
 		$this->assertTags($result, $expected);

0 notes on commit 2a674fc

Please sign in to comment.
Something went wrong with that request. Please try again.