| Total Complexity | 5 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class DependencyGuesserTest extends TestCase |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var DependencyGuesser |
||
| 14 | */ |
||
| 15 | private $guesser; |
||
| 16 | |||
| 17 | protected function setUp(): void |
||
| 20 | } |
||
| 21 | |||
| 22 | public function testGuessExtJson(): void |
||
| 23 | { |
||
| 24 | if (!extension_loaded('json')) { |
||
| 25 | $this->markTestSkipped('extension json is not available'); |
||
| 26 | } |
||
| 27 | $result = $this->guesser->__invoke('json_decode'); |
||
| 28 | $this->assertNotEmpty($result); |
||
| 29 | $this->assertContains('ext-json', $result); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function testDoesNotSuggestAnything(): void |
||
| 33 | { |
||
| 34 | $result = $this->guesser->__invoke('an_hopefully_unique_unknown_symbol'); |
||
| 35 | $this->assertFalse($result->valid()); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function testCoreExtensionsResolvesToPHP(): void |
||
| 45 | } |
||
| 46 | } |
||
| 47 |