12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- define('SORT_DATE', 3);
- define('SORT_IMAGE',4);
- class TestTablesort extends UnitTestCase{
-
- public function __construct(){
- $this->UnitTestCase('Tablesort library - main/inc/lib/tablesort.lib.test.php');
- }
-
- public function testSortTable(){
- $data= array('a', 'cd', 'efd');
- $column = 0;
- $direction = SORT_ASC;
- $type = SORT_REGULAR;
- $res =TableSort::sort_table($data, $column, $direction, $type);
- $this->assertTrue(is_array($res));
-
- }
- public function testSortTableConfig(){
- $data=array('a','b','c','d','e','z');
- $column = 0;
- $direction = SORT_ASC;
- $column_show=null;
- $column_order=null;
- $type = SORT_REGULAR;
- $res = TableSort::sort_table_config($data, $column, $direction, $column_show, $column_order,$type);
- $this->assertTrue(is_array($res));
-
- }
- }
- ?>
|