|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the jquery-datatables-bundle package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) 2018 WEBEWEB |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace WBW\Bundle\JQuery\DataTablesBundle\Tests\Api; |
|
13
|
|
|
|
|
14
|
|
|
use WBW\Bundle\JQuery\DataTablesBundle\Api\DataTablesColumnInterface; |
|
15
|
|
|
use WBW\Bundle\JQuery\DataTablesBundle\Tests\AbstractTestCase; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* DataTables column interface test. |
|
19
|
|
|
* |
|
20
|
|
|
* @author webeweb <https://github.com/webeweb> |
|
21
|
|
|
* @package WBW\Bundle\JQuery\DataTablesBundle\Tests\Api |
|
22
|
|
|
*/ |
|
23
|
|
|
class DataTablesColumnInterfaceTest extends AbstractTestCase { |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* Test __construct() |
|
27
|
|
|
* |
|
28
|
|
|
* @return void |
|
29
|
|
|
*/ |
|
30
|
|
|
public function test__construct(): void { |
|
31
|
|
|
|
|
32
|
|
|
$this->assertEquals("td", DataTablesColumnInterface::DATATABLES_CELL_TYPE_TD); |
|
33
|
|
|
$this->assertEquals("th", DataTablesColumnInterface::DATATABLES_CELL_TYPE_TH); |
|
34
|
|
|
|
|
35
|
|
|
$this->assertEquals("asc", DataTablesColumnInterface::DATATABLES_ORDER_SEQUENCE_ASC); |
|
36
|
|
|
$this->assertEquals("desc", DataTablesColumnInterface::DATATABLES_ORDER_SEQUENCE_DESC); |
|
37
|
|
|
|
|
38
|
|
|
$this->assertEquals("data", DataTablesColumnInterface::DATATABLES_PARAMETER_DATA); |
|
39
|
|
|
$this->assertEquals("name", DataTablesColumnInterface::DATATABLES_PARAMETER_NAME); |
|
40
|
|
|
$this->assertEquals("search", DataTablesColumnInterface::DATATABLES_PARAMETER_SEARCH); |
|
41
|
|
|
|
|
42
|
|
|
$this->assertEquals("date", DataTablesColumnInterface::DATATABLES_TYPE_DATE); |
|
43
|
|
|
$this->assertEquals("html", DataTablesColumnInterface::DATATABLES_TYPE_HTML); |
|
44
|
|
|
$this->assertEquals("html-num", DataTablesColumnInterface::DATATABLES_TYPE_HTML_NUM); |
|
45
|
|
|
$this->assertEquals("num", DataTablesColumnInterface::DATATABLES_TYPE_NUM); |
|
46
|
|
|
$this->assertEquals("num-fmt", DataTablesColumnInterface::DATATABLES_TYPE_NUM_FMT); |
|
47
|
|
|
$this->assertEquals("string", DataTablesColumnInterface::DATATABLES_TYPE_STRING); |
|
48
|
|
|
} |
|
49
|
|
|
} |
|
50
|
|
|
|