Skip to content

Commit 5cc77b0

Browse files
authored
Update ContainerBindConcreteWithClosureOnlyRector Unit test
1 parent e488862 commit 5cc77b0

File tree

1 file changed

+12
-0
lines changed
  • tests/Rector/MethodCall/ContainerBindConcreteWithClosureOnlyRector/Fixture

1 file changed

+12
-0
lines changed

tests/Rector/MethodCall/ContainerBindConcreteWithClosureOnlyRector/Fixture/fixture.php.inc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ $app->singleton(SomeInterface::class, function () {
1919
return new SomeClass();
2020
});
2121

22+
foreach ([SomeClass::class] as $item) {
23+
$app->singleton($item, function () use ($item) {
24+
return new $item();
25+
});
26+
}
27+
2228
?>
2329
-----
2430
<?php
@@ -42,4 +48,10 @@ $app->singleton(function (): \RectorLaravel\Tests\Rector\MethodCall\ContainerBin
4248
return new SomeClass();
4349
});
4450

51+
foreach ([SomeClass::class] as $item) {
52+
$app->singleton($item, function () use ($item) {
53+
return new $item();
54+
});
55+
}
56+
4557
?>

0 commit comments

Comments
 (0)