Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function testPut(): void |
||
31 | { |
||
32 | $point = new Point(1, 1); |
||
33 | $kdTree = new KDTree(2); |
||
34 | $kdTree->put($point); |
||
35 | |||
36 | $this->assertTrue($kdTree->contains($point)); |
||
37 | $this->assertEquals(1, $kdTree->size()); |
||
38 | $this->assertEquals($point, $kdTree->points()->current()); |
||
39 | $this->assertEquals($point, $kdTree->getRoot()->getPoint()); |
||
40 | |||
41 | $this->expectException(PointAlreadyExists::class); |
||
42 | $kdTree->put($point); |
||
43 | } |
||
55 |