Skip to content

Commit

Permalink
[1.x] Fixed tests (#65)
Browse files Browse the repository at this point in the history
* Fixed tests

* Update ReflectionClosure2Test.php
  • Loading branch information
GrahamCampbell authored Apr 8, 2023
1 parent fc3183f commit 5c1e047
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions tests/ReflectionClosure2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,23 +149,17 @@

test('anonymous inside closure', function () {
$f1 = function () {
return new class() extends A {
};
return new class() extends A {};
};
$e1 = 'function () {
return new class() extends \A
{
};
return new class() extends \A {};
}';

$f2 = function () {
return new class() extends A implements B {
};
return new class() extends A implements B {};
};
$e2 = 'function () {
return new class() extends \A implements \B
{
};
return new class() extends \A implements \B {};
}';

$f3 = function () {
Expand Down Expand Up @@ -277,8 +271,7 @@ public function x(\A $a): \B
function a(Qux $q): Bar
{
f1();
$a = new class() extends Bar {
};
$a = new class() extends Bar {};
}
};
$e7 = 'function () {
Expand All @@ -289,9 +282,7 @@ function a(Qux $q): Bar
function a(\Foo\Baz $q): \Foo\Bar
{
\Foo\f1();
$a = new class() extends \Foo\Bar
{
};
$a = new class() extends \Foo\Bar {};
}
}';

Expand Down

0 comments on commit 5c1e047

Please sign in to comment.