Translation update done using Pootle.
[phpmyadmin/ammaryasirr.git] / test / libraries / common / PMA_display_html_checkbox_test.php
blobc779d7212f2ce8bd7075dd6bbb99038119117937
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Test for PMA_display_html_checkbox from common.lib.php
6 * @package phpMyAdmin-test
7 * @version $Id: PMA_display_html_checkbox_test.php
8 * @group common.lib-tests
9 */
12 * Include to test.
14 require_once 'libraries/common.lib.php';
16 class PMA_display_html_checkbox_test extends PHPUnit_Extensions_OutputTestCase
18 function testDisplayHtmlCheckbox()
20 $name = "test_display_html_checkbox";
21 $label = "text_label_for_checkbox";
23 $this->expectOutputString('<input type="checkbox" name="' . $name . '" id="' . $name . '" /><label for="' . $name . '">' . $label . '</label>');
24 PMA_display_html_checkbox($name,$label,false,false);
27 function testDisplayHtmlCheckboxChecked()
29 $name = "test_display_html_checkbox";
30 $label = "text_label_for_checkbox";
32 $this->expectOutputString('<input type="checkbox" name="' . $name . '" id="' . $name . '" checked="checked" /><label for="' . $name . '">' . $label . '</label>');
33 PMA_display_html_checkbox($name,$label,true,false);
36 function testDisplayHtmlCheckboxOnclick()
38 $name = "test_display_html_checkbox";
39 $label = "text_label_for_checkbox";
41 $this->expectOutputString('<input type="checkbox" name="' . $name . '" id="' . $name . '" onclick="this.form.submit();" /><label for="' . $name . '">' . $label . '</label>');
42 PMA_display_html_checkbox($name,$label,false,true);
45 function testDisplayHtmlCheckboxCheckedOnclick()
47 $name = "test_display_html_checkbox";
48 $label = "text_label_for_checkbox";
50 $this->expectOutputString('<input type="checkbox" name="' . $name . '" id="' . $name . '" checked="checked" onclick="this.form.submit();" /><label for="' . $name . '">' . $label . '</label>');
51 PMA_display_html_checkbox($name,$label,true,true);
55 //PMA_display_html_checkbox