Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions tests/custom_completion_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down