Skip to content

Commit

Permalink
Fixing tests for PR #1502 (issue #1492)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdomba committed Nov 14, 2012
1 parent b7c2f5a commit 5722729
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/framework/web/helpers/CHtmlTest.php
Expand Up @@ -860,11 +860,11 @@ public function providerLinkButton()
{
return array(
array('submit', array(), '<a href="#" id="yt0">submit</a>',
"$('body').on('click','#yt0',function(){jQuery.yii.submitForm(this,'',{});return false;});"),
"jQuery('body').on('click','#yt0',function(){jQuery.yii.submitForm(this,'',{});return false;});"),
array('link-button', array(), '<a href="#" id="yt0">link-button</a>',
"$('body').on('click','#yt0',function(){jQuery.yii.submitForm(this,'',{});return false;});"),
"jQuery('body').on('click','#yt0',function(){jQuery.yii.submitForm(this,'',{});return false;});"),
array('link-button', array('href'=>'http://yiiframework.com/'), '<a href="#" id="yt0">link-button</a>',
"$('body').on('click','#yt0',function(){jQuery.yii.submitForm(this,'http://yiiframework.com/',{});return false;});"),
"jQuery('body').on('click','#yt0',function(){jQuery.yii.submitForm(this,'http://yiiframework.com/',{});return false;});"),
);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/framework/zii/widgets/grid/CButtonColumnTest.php
Expand Up @@ -6,7 +6,7 @@ class CButtonColumnTest extends CTestCase
{
public function testCallbackEncoding()
{
$expected = "$(document).on('click','#grid1 a.view',function() { /* callback */ });";
$expected = "jQuery(document).on('click','#grid1 a.view',function() { /* callback */ });";

$out=$this->getWidgetScript('js:function() { /* callback */ }');
$this->assertTrue(mb_strpos($out,$expected, null, Yii::app()->charset)!==false, "Unexpected JavaScript (js:): ".$out);
Expand Down

0 comments on commit 5722729

Please sign in to comment.