From 82fd1204f6406dddb82c861ba16c40214dd30f13 Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Mon, 3 Aug 2026 09:24:29 +0800 Subject: [PATCH] GHI769 Fix custom completion test compatibility --- tests/custom_completion_test.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/custom_completion_test.php b/tests/custom_completion_test.php index 6d8a5b9f..47e2538f 100644 --- a/tests/custom_completion_test.php +++ b/tests/custom_completion_test.php @@ -208,13 +208,12 @@ public function test_get_available_custom_rules(int $status, array $expected): v // Build a mock cm_info instance. $mockcminfo = $this->getMockBuilder(cm_info::class) ->disableOriginalConstructor() - ->onlyMethods(['__get']) + ->onlyMethods(['get_custom_data']) ->getMock(); - // Mock the return of magic getter for the customdata attribute. + // Mock the return of the customdata getter. $mockcminfo->expects($this->any()) - ->method('__get') - ->with('customdata') + ->method('get_custom_data') ->willReturn($customdataval); $customcompletion = new custom_completion($mockcminfo, 1);