Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class cleaner_backup_test extends \advanced_testcase {

public function delete_provider() {
public static function delete_provider() {
// Array of filename, deleted.
return [
['myfile.txt', false],
Expand Down
2 changes: 1 addition & 1 deletion cleaner/email/tests/cleaner_email_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function test_cleaner_email_suffix_ignore_pattern($input, $expected, $suf
*
* @return array
*/
public function provider_for_cleaner_email_suffix_ignore_pattern() {
public static function provider_for_cleaner_email_suffix_ignore_pattern() {
return [
['user@example.com', 'user@example.com.suffix', '.suffix', 'moodle.com'],
['user@email.com', 'user@email.com.suffix', '.suffix', 'emailsuffix.com'],
Expand Down
4 changes: 2 additions & 2 deletions cleaner/muc/tests/phpunit/events_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected function setUp() : void {
$this->resetAfterTest(false);
}

public function provider_for_test_events_have_the_correct_properties() {
public static function provider_for_test_events_have_the_correct_properties() {
return [
[muc_config_saved::class, 'c'],
[muc_config_deleted::class, 'd'],
Expand Down Expand Up @@ -70,7 +70,7 @@ public function test_events_have_the_correct_properties($class, $crud) {
self::assertSame($expected, $actual);
}

public function provider_for_test_events_have_the_correct_description() {
public static function provider_for_test_events_have_the_correct_description() {
return [
[
muc_config_saved::class,
Expand Down
2 changes: 1 addition & 1 deletion cleaner/muc/tests/phpunit/output/index_renderer_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @SuppressWarnings(public) Allow as many methods as needed.
*/
class local_cleanurls_cleaner_muc_index_page_test extends local_datacleaner_cleaner_muc_testcase {
class local_cleanurls_cleaner_muc_index_renderer_test extends local_datacleaner_cleaner_muc_testcase {
protected function setUp() : void {
global $PAGE, $OUTPUT;

Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions tests/unit/table_scrambler_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
* @SuppressWarnings(public) Allow as many methods as needed.
*/
class local_datacleaner_table_scrambler_test extends advanced_testcase {
public function provider_for_it_creates_sorted_temporary_tables() {
public static function provider_for_it_creates_sorted_temporary_tables() {
return [
'unrepeated' => [
$this->create_test_data_array(),
self::create_test_data_array(),
[
['id' => '1', 'value' => 'Bill'],
['id' => '2', 'value' => 'David'],
Expand Down Expand Up @@ -75,7 +75,7 @@ public function provider_for_it_creates_sorted_temporary_tables() {
];
}

public function provider_for_it_scrambles_names() {
public static function provider_for_it_scrambles_names() {
return [
['', [
['id' => '1', 'first' => 'David', 'last' => 'Jones'],
Expand All @@ -96,7 +96,7 @@ public function provider_for_it_scrambles_names() {
];
}

public function provider_for_the_next_prime_after() {
public static function provider_for_the_next_prime_after() {
return [
[0, 2],
[1, 2],
Expand All @@ -105,7 +105,7 @@ public function provider_for_the_next_prime_after() {
];
}

public function provider_for_the_prime_factors() {
public static function provider_for_the_prime_factors() {
return [
[2, 1, [2, 3]],
[2, 3, [2, 3]],
Expand Down Expand Up @@ -216,7 +216,7 @@ private function create_test_data($data = null) {
global $DB;

if (is_null($data)) {
$data = $this->create_test_data_array();
$data = self::create_test_data_array();
}

// Create test table.
Expand All @@ -237,7 +237,7 @@ private function create_test_data($data = null) {
return $table;
}

private function create_test_data_array() {
private static function create_test_data_array() {
return [
['first' => 'David', 'last' => 'Smith'],
['first' => 'Nicholas', 'last' => 'Hoobin'],
Expand Down