mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Additional Ajax test
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4459 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
454d9716d2
commit
3500fa5917
1 changed files with 4 additions and 0 deletions
|
@ -51,6 +51,10 @@ class AjaxTest extends UnitTestCase {
|
||||||
$result = $this->ajax->link('Test Link', '/', array('id' => 'link1', 'update' => 'content', 'evalScripts' => false));
|
$result = $this->ajax->link('Test Link', '/', array('id' => 'link1', 'update' => 'content', 'evalScripts' => false));
|
||||||
$expected = '<a href="/" id="link1" onclick=" return false;">Test Link</a><script type="text/javascript">Event.observe(\'link1\', \'click\', function(event){ new Ajax.Updater(\'content\',\'/\', {asynchronous:true, evalScripts:false, requestHeaders:[\'X-Update\', \'content\']}) }, false);</script>';
|
$expected = '<a href="/" id="link1" onclick=" return false;">Test Link</a><script type="text/javascript">Event.observe(\'link1\', \'click\', function(event){ new Ajax.Updater(\'content\',\'/\', {asynchronous:true, evalScripts:false, requestHeaders:[\'X-Update\', \'content\']}) }, false);</script>';
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($result, $expected);
|
||||||
|
|
||||||
|
$result = $this->ajax->link('Test Link', '/', array('id' => 'link1', 'update' => 'content'));
|
||||||
|
$expected = '<a href="/" id="link1" onclick=" return false;">Test Link</a><script type="text/javascript">Event.observe(\'link1\', \'click\', function(event){ new Ajax.Updater(\'content\',\'/\', {asynchronous:true, evalScripts:true, requestHeaders:[\'X-Update\', \'content\']}) }, false);</script>';
|
||||||
|
$this->assertEqual($result, $expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAsynchronous() {
|
function testAsynchronous() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue