From 049b0b27aed32123566631513646db734a4e032f Mon Sep 17 00:00:00 2001 From: Henrique Moody Date: Sun, 2 Apr 2023 15:29:53 +0200 Subject: [PATCH] Do not use the test class to test the Callback rule That will help us later because, on PHPUnit 10, all data providers need to be static. Signed-off-by: Henrique Moody --- tests/unit/Rules/CallbackTest.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/unit/Rules/CallbackTest.php b/tests/unit/Rules/CallbackTest.php index 0fb67ddb..440150fe 100644 --- a/tests/unit/Rules/CallbackTest.php +++ b/tests/unit/Rules/CallbackTest.php @@ -32,7 +32,7 @@ final class CallbackTest extends RuleTestCase { return [ [new Callback('is_a', 'stdClass'), new stdClass()], - [new Callback([$this, 'sampleCallbackUsedInsideThisTest']), 'test'], + [new Callback([new AlwaysValid(), 'validate']), 'test'], [new Callback('is_string'), 'test'], [ new Callback(static function () { @@ -43,11 +43,6 @@ final class CallbackTest extends RuleTestCase ]; } - public function sampleCallbackUsedInsideThisTest(): bool - { - return true; - } - /** * {@inheritDoc} */