1 | <?php |
||
8 | class ColumnPathTest extends TestCase |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var ColumnPath |
||
13 | */ |
||
14 | private $columnPath; |
||
15 | |||
16 | protected function setUp() |
||
17 | { |
||
18 | $this->columnPath = new ColumnPath('[Name].id'); |
||
19 | } |
||
20 | |||
21 | protected function tearDown() |
||
22 | { |
||
23 | $this->columnPath = null; |
||
24 | } |
||
25 | |||
26 | public function testGetKeyName() |
||
27 | { |
||
28 | $this->assertEquals('ColumnPath', $this->columnPath->getKeyName()); |
||
29 | } |
||
30 | |||
31 | public function testSetGetValue() |
||
32 | { |
||
33 | $this->assertEquals('[Name].id', $this->columnPath->getValue()); |
||
34 | $this->columnPath->setValue('test'); |
||
35 | $this->assertEquals('test', $this->columnPath->getValue()); |
||
36 | } |
||
37 | |||
38 | public function testToArray() |
||
39 | { |
||
40 | $this->assertEquals([ |
||
41 | 'value' => '[Name].id', |
||
42 | ], $this->columnPath->toArray()); |
||
43 | } |
||
44 | } |
||
45 |