MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit and we are checking for it since Moodle 4.4. All the changes in this commit have been applied automatically using the moodle.PHPUnit.TestReturnType sniff and are, exclusively adding the ": void" return types when missing.
This commit is contained in:
@@ -53,7 +53,7 @@ class database_logger_test extends \advanced_testcase {
|
||||
/**
|
||||
* Ensure that store_log_for_task works with a passing scheduled task.
|
||||
*/
|
||||
public function test_store_log_for_task_scheduled() {
|
||||
public function test_store_log_for_task_scheduled(): void {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
@@ -82,7 +82,7 @@ class database_logger_test extends \advanced_testcase {
|
||||
/**
|
||||
* Ensure that store_log_for_task works with a passing adhoc task.
|
||||
*/
|
||||
public function test_store_log_for_task_adhoc() {
|
||||
public function test_store_log_for_task_adhoc(): void {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
@@ -114,7 +114,7 @@ class database_logger_test extends \advanced_testcase {
|
||||
/**
|
||||
* Ensure that store_log_for_task works with a failing scheduled task.
|
||||
*/
|
||||
public function test_store_log_for_task_failed_scheduled() {
|
||||
public function test_store_log_for_task_failed_scheduled(): void {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
@@ -143,7 +143,7 @@ class database_logger_test extends \advanced_testcase {
|
||||
/**
|
||||
* Ensure that store_log_for_task works with a failing adhoc task.
|
||||
*/
|
||||
public function test_store_log_for_task_failed_adhoc() {
|
||||
public function test_store_log_for_task_failed_adhoc(): void {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
@@ -175,7 +175,7 @@ class database_logger_test extends \advanced_testcase {
|
||||
/**
|
||||
* Ensure that store_log_for_task works with a passing adhoc task run as a specific user.
|
||||
*/
|
||||
public function test_store_log_for_task_adhoc_userid() {
|
||||
public function test_store_log_for_task_adhoc_userid(): void {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
@@ -249,7 +249,7 @@ class database_logger_test extends \advanced_testcase {
|
||||
/**
|
||||
* Ensure that the retention period applies correctly.
|
||||
*/
|
||||
public function test_cleanup_retention() {
|
||||
public function test_cleanup_retention(): void {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
@@ -313,7 +313,7 @@ class database_logger_test extends \advanced_testcase {
|
||||
/**
|
||||
* Ensure that the run-count retention applies.
|
||||
*/
|
||||
public function test_cleanup_retainruns() {
|
||||
public function test_cleanup_retainruns(): void {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
@@ -419,7 +419,7 @@ class database_logger_test extends \advanced_testcase {
|
||||
/**
|
||||
* Ensure that the retention period applies correctly when combined with the run count retention.
|
||||
*/
|
||||
public function test_cleanup_combined() {
|
||||
public function test_cleanup_combined(): void {
|
||||
global $DB;
|
||||
|
||||
$this->resetAfterTest();
|
||||
|
||||
Reference in New Issue
Block a user