From 36aa41afa45247f288cf63295a268ef7b1a7c7a5 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 31 Mar 2024 15:02:57 +0200 Subject: [PATCH] IsReferenceTest: fix invalid test case Closures use clauses only take plain variables, not complex variables, like properties or array keys. In other words, this test case as-is, was a parse error. For the purposes of this test, it makes no difference what type of variable is passed, so let's fix the test. --- tests/Core/File/IsReferenceTest.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Core/File/IsReferenceTest.inc b/tests/Core/File/IsReferenceTest.inc index 93c7acc677..d371d6ef2d 100644 --- a/tests/Core/File/IsReferenceTest.inc +++ b/tests/Core/File/IsReferenceTest.inc @@ -169,7 +169,7 @@ functionCall( $something , &new Foobar() ); $closure = function() use (&$var){}; /* testUseByReferenceWithCommentFirstParam */ -$closure = function() use /*comment*/ (&$this->value){}; +$closure = function() use /*comment*/ (&$value){}; /* testUseByReferenceWithCommentSecondParam */ $closure = function() use /*comment*/ ($varA, &$varB){};