From 019e114cd53a4719112eef9f6250e63a6130196a 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 e46ce656e..84b6a1226 100644 --- a/tests/custom_completion_test.php +++ b/tests/custom_completion_test.php @@ -209,13 +209,12 @@ public function test_get_available_custom_rules(int $status, array $expected) { // 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);