diff --git a/tests/unit/functions/functions_modules_test.php b/tests/unit/functions/functions_modules_test.php new file mode 100644 index 00000000..4c586095 --- /dev/null +++ b/tests/unit/functions/functions_modules_test.php @@ -0,0 +1,76 @@ +assertEquals($expected, column_num_string($input)); + } + + public function data_column_string_num() + { + return array( + array(0, ''), + array(0, false), + array(1, 'left'), + array(2, 'center'), + array(3, 'right'), + array(4, 'top'), + array(5, 'bottom'), + ); + } + + /** + * @dataProvider data_column_string_num + */ + public function test_column_string_num($expected, $input) + { + $this->assertEquals($expected, column_string_num($input)); + } + + public function data_column_string_const() + { + return array( + array(0, ''), + array(0, ''), + array(2, 'left'), + array(4, 'center'), + array(8, 'right'), + array(1, 'top'), + array(16, 'bottom'), + ); + } + + /** + * @dataProvider data_column_string_const + */ + public function test_column_string_const($expected, $input) + { + $this->assertEquals($expected, column_string_const($input)); + } +}