test: Fix PHPUnit 11 use in Behat

Starting with PHPUnit 11.3, some complex outputs of certain asserts
(like "assertStringContainsString") require the output of PHPUnit to be
explicitly setup. Otherwise when the assert fails a type error is
thrown (although it does not seem to affect asserts with simpler
outputs, like "assertEquals").

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2025-12-08 16:21:30 +01:00
parent bbca4fe56e
commit 19c9d88970

View file

@ -475,6 +475,13 @@ trait BasicStructure {
sleep((int)$seconds);
}
/**
* @BeforeSuite
*/
public static function createPHPUnitConfiguration(): void {
(new \PHPUnit\TextUI\Configuration\Builder())->build([]);
}
/**
* @BeforeSuite
*/