MDL-71036 phpunit: Fix param check, must be array

With stricter typed param checks in php73, the 7th param of the
getMockForAbstractClass() must be array, so previous code defaulting
to null now throws a TypeError.
This commit is contained in:
Eloy Lafuente (stronk7) 2021-02-20 15:45:28 +01:00
parent 5f755ac26e
commit 857f6385a4

View File

@ -538,10 +538,7 @@ class filterset_test extends advanced_testcase {
* @param array $mockedmethods anonymous array containing the list of mocked methods
* @return filterset Mock of the filterset
*/
protected function get_mocked_filterset(array $mockedmethods = null): filterset {
if (empty($mockedmethods)) {
$mockedmethods = null;
}
protected function get_mocked_filterset(array $mockedmethods = []): filterset {
return $this->getMockForAbstractClass(filterset::class, [], '', true, true, true, $mockedmethods);
}