MDL-81522 phpunit: Add a few non-void return types to tests

This is the final (3rd) commit, where we are adding missing
return types to a few tests (using @depends) which return
types are non-void, but something really returned (for consume
by the dependent test).
This commit is contained in:
Eloy Lafuente (stronk7)
2024-06-11 12:18:05 +02:00
parent 091b458c52
commit 2a86638a15
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -422,7 +422,7 @@ class advanced_test extends \advanced_testcase {
$this->assertEquals(count($processors1) + 1, count($processors3));
}
public function test_message_redirection() {
public function test_message_redirection(): \phpunit_message_sink {
$this->preventResetByRollback(); // Messaging is not compatible with transactions...
$this->resetAfterTest(false);
@@ -544,7 +544,7 @@ class advanced_test extends \advanced_testcase {
/**
* @depends test_message_redirection
*/
public function test_message_redirection_noreset($sink): void {
public function test_message_redirection_noreset(\phpunit_message_sink $sink): void {
if ($this->isInIsolation()) {
$this->markTestSkipped('State cannot be carried over between tests in isolated tests');
}