Skip to content

Commit

Permalink
adjust adler_testcase to not fail on "unexpected output" when called …
Browse files Browse the repository at this point in the history
…via default moodle phpunit.xml instead of the one of the plugin
  • Loading branch information
Glutamat42 committed Sep 19, 2024
1 parent 85c5a07 commit 9a03ad8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/lib/adler_testcase.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use externallib_advanced_testcase;
use Mockery;

trait general_testcase_adjustments{
trait general_testcase_adjustments {
public function setUp(): void {
parent::setUp();

Expand All @@ -23,6 +23,11 @@ public function setUp(): void {
// This is not desired, because test cases should be independent of each other. Therefore, the
// Mockery container is reset after each test case.
Mockery::resetContainer();

// workaround for beStrictAboutOutputDuringTests = true in default moodle phpunit configuration
if ($this->getTestResultObject()->isStrictAboutOutputDuringTests()){
$this->expectOutputRegex('/.*/');
}
}

public function tearDown(): void {
Expand Down

0 comments on commit 9a03ad8

Please sign in to comment.