diff --git a/test/classes/UtilTest.php b/test/classes/UtilTest.php index 9abf67b671..e3536732cb 100644 --- a/test/classes/UtilTest.php +++ b/test/classes/UtilTest.php @@ -1842,4 +1842,40 @@ class UtilTest extends \PMATestCase array(821958, '9 days, 12 hours, 19 minutes and 18 seconds') ); } + + /** + * test for generating string contains printable bit value of selected data + * + * @param integer $a Value + * @param int $b Length + * @param string $e Expected output + * + * @return void + * + * @covers PhpMyAdmin\Util::printableBitValue + * @dataProvider providerPrintableBitValue + */ + public function testPrintableBitValue($a, $b, $e) + { + $this->assertEquals( + $e, Util::printableBitValue($a, $b) + ); + } + + /** + * data provider for printable bit value test + * + * @return array + */ + public function providerPrintableBitValue() + { + return array( + array( + '20131009', + 64, + '0000000000000000000000000000000000000001001100110010110011000001' + ), + array('5', 32, '00000000000000000000000000000101') + ); + } } diff --git a/test/libraries/common/PMA_printableBitValue_test.php b/test/libraries/common/PMA_printableBitValue_test.php deleted file mode 100644 index 8b9ea80c4f..0000000000 --- a/test/libraries/common/PMA_printableBitValue_test.php +++ /dev/null @@ -1,58 +0,0 @@ -assertEquals( - $e, PhpMyAdmin\Util::printableBitValue($a, $b) - ); - } -}