-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.7, 4.1.2
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MDL-77935-401 -
$ vendor/bin/phpunit contentbank/tests/contentbank_test.php --filter test_is_context_allowed --process-isolation
|
Moodle 4.2beta (Build: 20230414)
|
Php: 8.0.28, mysqli: 8.0.32, OS: Linux 5.4.0-146-generic x86_64
|
PHPUnit 9.5.27 by Sebastian Bergmann and contributors.
|
|
Serialization of 'Closure' is not allowed
|
The test case never completes, because PHPUnit crashes during the run
It's related to a "feature" (bug?) within PHPUnit that is described at https://github.com/sebastianbergmann/phpunit/issues/2739 - caused by the following:
- Test using a @dataProvider;
- @dataProvider returns a closure/callable;
- Running with --process-isolation
Grepping the codebase, it seems we hit this only in contentbank tests (I didn't find any other cases that would trigger it)