From 91f453d6df23ff64f414ea7f8b69fd0f46ec20c9 Mon Sep 17 00:00:00 2001 From: David Watson <14983002+watson8@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:42:00 +0100 Subject: [PATCH] CTP-3560 setUp tearDown ret type --- tests/classes/models/coursework_test.php | 2 +- tests/classes/models/submission_test.php | 2 +- tests/generator_test.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/classes/models/coursework_test.php b/tests/classes/models/coursework_test.php index c2e901b0..434b3e33 100644 --- a/tests/classes/models/coursework_test.php +++ b/tests/classes/models/coursework_test.php @@ -60,7 +60,7 @@ public function setUp(): void { /** * Clean up the test fixture by removing the objects. */ - public function tearDown() { + public function tearDown(): void { global $DB; $DB->delete_records('coursework', array('id' => $this->coursework->id)); diff --git a/tests/classes/models/submission_test.php b/tests/classes/models/submission_test.php index 15db4d4d..22fdd492 100644 --- a/tests/classes/models/submission_test.php +++ b/tests/classes/models/submission_test.php @@ -56,7 +56,7 @@ public function setUp(): void { /** * Clean up the test fixture by removing the objects. */ - public function tearDown() { + public function tearDown(): void { global $DB; $DB->delete_records('coursework', array('id' => $this->coursework->id)); diff --git a/tests/generator_test.php b/tests/generator_test.php index f4fac75f..49c24a31 100644 --- a/tests/generator_test.php +++ b/tests/generator_test.php @@ -44,7 +44,7 @@ class generator_test extends \advanced_testcase { /** * Sets things up for every test. We want all to clean up after themselves. */ - public function setUp():void { + public function setUp(): void { $this->resetAfterTest(true); }