-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
5 changed files
with
120 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
/* vim: set expandtab sw=4 ts=4 sts=4: */ | ||
/** | ||
* Test for PMA_display_html_checkbox from common.lib.php | ||
* | ||
* @package PhpMyAdmin-test | ||
* @group common.lib-tests | ||
*/ | ||
|
||
/* | ||
* Include to test. | ||
*/ | ||
require_once 'libraries/common.lib.php'; | ||
|
||
class PMA_display_html_checkbox_test extends PHPUnit_Framework_TestCase | ||
{ | ||
function testGetCheckbox() | ||
{ | ||
$name = "test_display_html_checkbox"; | ||
$label = "text_label_for_checkbox"; | ||
|
||
$this->assertEquals( | ||
PMA_getCheckbox($name, $label, false, false), | ||
'<input type="checkbox" name="' . $name . '" id="' . $name . '" /><label for="' . $name . '">' . $label . '</label>' | ||
) | ||
} | ||
|
||
function testGetCheckboxChecked() | ||
{ | ||
$name = "test_display_html_checkbox"; | ||
$label = "text_label_for_checkbox"; | ||
|
||
$this->assertEquals( | ||
PMA_getCheckbox($name, $label, true, false), | ||
'<input type="checkbox" name="' . $name . '" id="' . $name . '" checked="checked" /><label for="' . $name . '">' . $label . '</label>' | ||
); | ||
} | ||
|
||
function testGetCheckboxOnclick() | ||
{ | ||
$name = "test_display_html_checkbox"; | ||
$label = "text_label_for_checkbox"; | ||
|
||
$this->assertEquals( | ||
PMA_getCheckbox($name, $label, false, true), | ||
'<input type="checkbox" name="' . $name . '" id="' . $name . '" class="autosubmit" /><label for="' . $name . '">' . $label . '</label>' | ||
); | ||
} | ||
|
||
function testGetCheckboxCheckedOnclick() | ||
{ | ||
$name = "test_display_html_checkbox"; | ||
$label = "text_label_for_checkbox"; | ||
|
||
$this->assertEquals( | ||
PMA_getCheckbox($name, $label, true, true), | ||
'<input type="checkbox" name="' . $name . '" id="' . $name . '" checked="checked" class="autosubmit" /><label for="' . $name . '">' . $label . '</label>' | ||
); | ||
} | ||
} | ||
|
||
//PMA_display_html_checkbox |