| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class PriorityQueueTest extends TestCase |
||
| 14 | { |
||
| 15 | public function testExtendsSplPriorityQueue(): void |
||
| 16 | { |
||
| 17 | $priorityQueue = new PriorityQueue(); |
||
| 18 | |||
| 19 | $this->assertInstanceOf(\SplPriorityQueue::class, $priorityQueue); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @dataProvider getCompareData |
||
| 24 | */ |
||
| 25 | public function testCompare(mixed $priority1, mixed $priority2): void |
||
| 26 | { |
||
| 27 | $priorityQueue = new PriorityQueue(); |
||
| 28 | |||
| 29 | $this->assertSame( |
||
| 30 | ($priority1 <=> $priority2), |
||
| 31 | $priorityQueue->compare($priority1, $priority2) |
||
| 32 | ); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return array<mixed> |
||
| 37 | */ |
||
| 38 | public function getCompareData(): array |
||
| 58 | ], |
||
| 59 | ]; |
||
| 60 | } |
||
| 62 |