MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods now are required to return void. This was warned with phpunit 7 and now is enforced. At the same time, fix a few wrong function names, provider data and param types, return statements...
This commit is contained in:
@@ -41,7 +41,7 @@ class question_attempt_step_iterator_test extends advanced_testcase {
|
||||
private $qa;
|
||||
private $iterator;
|
||||
|
||||
protected function setUp() {
|
||||
protected function setUp(): void {
|
||||
$question = test_question_maker::make_question('description');
|
||||
$this->qa = new testable_question_attempt($question, 0);
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
@@ -51,7 +51,7 @@ class question_attempt_step_iterator_test extends advanced_testcase {
|
||||
$this->iterator = $this->qa->get_step_iterator();
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
protected function tearDown(): void {
|
||||
$this->qa = null;
|
||||
$this->iterator = null;
|
||||
}
|
||||
@@ -141,4 +141,4 @@ class question_attempt_step_iterator_test extends advanced_testcase {
|
||||
public function test_cannot_unset() {
|
||||
unset($this->iterator[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user