Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make test data provider methods static #468

Merged
merged 1 commit into from
Mar 2, 2025
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
2 changes: 1 addition & 1 deletion factor/email/tests/factor_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class email_factor_test extends \core_phpunit\testcase {
* Provides to test_generate_email_ip_address_location test.
* @return array
*/
public function generate_email_ip_address_location_provider(): array {
public static function generate_email_ip_address_location_provider(): array {
return [
'real ip v4' => [
// Note - this is the same IP address used by core_iplookup_geoplugin_testcase.
Expand Down
2 changes: 1 addition & 1 deletion factor/token/tests/factor_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public function test_calculate_expiry_time_for_overnight_expiry_with_an_hour_exp
* Increments by 30 minutes to cover half hour and hour cases.
* Starting timestamp: 2022-01-15 07:30:00 Australia/Melbourne time.
*/
public function timestamp_provider() {
public static function timestamp_provider() {
$starttimestamp = 1642192200;
foreach (range(0, 23) as $i) {
$timestamps[] = [$starttimestamp + ($i * HOURSECS)];
Expand Down
Loading