| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class UseBlockParserTest extends TestCase |
||
| 11 | { |
||
| 12 | private UseBlockParser $parser; |
||
| 13 | |||
| 14 | protected function setUp(): void |
||
| 15 | { |
||
| 16 | $this->parser = new UseBlockParser(); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function test_get_class_from_empty_doc_block(): void |
||
| 20 | { |
||
| 21 | $actual = $this->parser->getUseStatement('TestClass', ''); |
||
| 22 | |||
| 23 | self::assertSame('', $actual); |
||
| 24 | } |
||
| 25 | |||
| 26 | |||
| 27 | public function test_get_class_from_method_not_found(): void |
||
| 28 | { |
||
| 29 | $actual = $this->parser->getUseStatement('NonExistingClass', $this->phpCode()); |
||
| 30 | |||
| 31 | self::assertSame('', $actual); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function test_get_class_from_method(): void |
||
| 39 | } |
||
| 40 | |||
| 41 | private function phpCode(): string |
||
| 44 | <?php |
||
| 45 | namespace ns\test; |
||
| 46 | |||
| 62 |