Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function testConstruct() |
||
24 | { |
||
25 | $client = new Client('mock', 'mock'); |
||
26 | $mock = new MockResource($client, $this->mock_resource_data); |
||
27 | |||
28 | $this->assertEquals($client, $mock->getClient()); |
||
29 | |||
30 | // Test the casting |
||
31 | $this->assertEquals(true, $mock->bool_test); |
||
32 | $this->assertEquals(8, $mock->int_test); |
||
33 | $this->assertEquals(8.5, $mock->float_test); |
||
34 | |||
35 | $date = new \DateTime('2021-10-05 00:13:25 CET'); |
||
36 | $this->assertEquals($date->getTimestamp(), $mock->date_test->getTimestamp()); |
||
37 | |||
38 | $client_2 = new Client('mock2', 'mock2'); |
||
39 | $mock->setClient($client_2); |
||
40 | $this->assertEquals($client_2, $mock->getClient()); |
||
41 | } |
||
44 |