File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ public function refreshRectors(array $rectors): void
3333 }
3434
3535 /**
36- * @return array<RectorInterface>
36+ * @return RectorInterface[]
37+ *
38+ * @api used in tests
3739 */
3840 public function forPath (string $ filePath ): array
3941 {
Original file line number Diff line number Diff line change 99use Rector \Configuration \Parameter \SimpleParameterProvider ;
1010use Rector \Testing \PHPUnit \AbstractLazyTestCase ;
1111use Rector \Tests \Application \Source \SkippableRector ;
12- use Rector \Tests \Skipper \Skipper \Fixture \Element \FifthElement ;
1312
1413final class RectorRegistryTest extends AbstractLazyTestCase
1514{
@@ -21,11 +20,10 @@ protected function setUp(): void
2120
2221 SimpleParameterProvider ::setParameter (Option::SKIP , [
2322 SkippableRector::class => ['*/skipped_directory/* ' ],
24- FifthElement::class => ['*/skipped_directory/* ' ],
2523 ]);
2624
2725 $ this ->rectorRegistry = $ this ->make (RectorRegistry::class);
28- $ this ->rectorRegistry ->refreshRectors ([new FifthElement ()]);
26+ $ this ->rectorRegistry ->refreshRectors ([new SkippableRector ()]);
2927 }
3028
3129 protected function tearDown (): void
@@ -46,6 +44,5 @@ public function testForPathKeepsRectorForOtherPath(): void
4644
4745 $ this ->assertCount (1 , $ rectorsForPath );
4846 $ this ->assertInstanceOf (SkippableRector::class, $ rectorsForPath [0 ]);
49- $ this ->assertInstanceOf (FifthElement::class, $ rectorsForPath [0 ]);
5047 }
5148}
You can’t perform that action at this time.
0 commit comments