1 | <?php |
||||||
2 | |||||||
3 | declare(strict_types=1); |
||||||
4 | |||||||
5 | namespace Gember\FileReflectorRoave\Test; |
||||||
6 | |||||||
7 | use Gember\EventSourcing\Util\File\Reflector\ReflectionFailedException; |
||||||
8 | use Gember\FileReflectorRoave\RoaveBetterReflectionFactory; |
||||||
0 ignored issues
–
show
|
|||||||
9 | use Gember\FileReflectorRoave\RoaveBetterReflectionReflector; |
||||||
0 ignored issues
–
show
The type
Gember\FileReflectorRoav...tterReflectionReflector was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||||
10 | use Gember\FileReflectorRoave\Test\TestDoubles\TestClass; |
||||||
0 ignored issues
–
show
The type
Gember\FileReflectorRoav...t\TestDoubles\TestClass was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||||
11 | use PHPUnit\Framework\Attributes\Test; |
||||||
0 ignored issues
–
show
The type
PHPUnit\Framework\Attributes\Test was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||||
12 | use PHPUnit\Framework\TestCase; |
||||||
13 | |||||||
14 | /** |
||||||
15 | * @internal |
||||||
16 | */ |
||||||
17 | final class RoaveBetterReflectionReflectorTest extends TestCase |
||||||
18 | { |
||||||
19 | private RoaveBetterReflectionReflector $reflector; |
||||||
20 | |||||||
21 | protected function setUp(): void |
||||||
22 | { |
||||||
23 | parent::setUp(); |
||||||
24 | |||||||
25 | $this->reflector = new RoaveBetterReflectionReflector( |
||||||
26 | new RoaveBetterReflectionFactory(), |
||||||
27 | ); |
||||||
28 | } |
||||||
29 | |||||||
30 | #[Test] |
||||||
31 | public function itShouldReflectFileName(): void |
||||||
32 | { |
||||||
33 | $reflectionClass = $this->reflector->reflectClassFromFile(__DIR__ . '/TestDoubles/TestClass.php'); |
||||||
34 | |||||||
35 | self::assertSame(TestClass::class, $reflectionClass->getName()); |
||||||
36 | } |
||||||
37 | |||||||
38 | #[Test] |
||||||
39 | public function itShouldThrowExceptionWhenClassNotFound(): void |
||||||
40 | { |
||||||
41 | self::expectException(ReflectionFailedException::class); |
||||||
0 ignored issues
–
show
The method
PHPUnit\Framework\TestCase::expectException() is not static, but was called statically.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
42 | |||||||
43 | $this->reflector->reflectClassFromFile(__DIR__ . '/TestDoubles/no-class.php'); |
||||||
44 | } |
||||||
45 | } |
||||||
46 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths