blob: dc7e58abed4ef69b030e386ba426985529ed3bb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Test for PMA_CommonFunctions::convertBitDefaultValue from common.lib
*
* @package PhpMyAdmin-test
* @group common.lib-tests
*/
/*
* Include to test.
*/
require_once 'libraries/Util.class.php';
class PMA_ConvertBitDefaultValueTest extends PHPUnit_Framework_TestCase
{
function dataProvider()
{
return array(
array("b'",""),
array("b'01'","01"),
array("b'010111010'","010111010")
);
}
/**
* @dataProvider dataProvider
*/
function testConvert_bit_default_value_test($bit, $val)
{
$this->assertEquals(
$val, PMA_Util::convertBitDefaultValue($bit)
);
}
}
|