Skip to content

Commit

Permalink
Update unit test functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen Herbert committed Aug 31, 2023
1 parent 312aa3a commit 0a104c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions factor/email/tests/factor_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ public function test_generate_email_ip_address_location(string $ip, bool $expect
$unknownstr = get_string('email:geoinfo:unknown', 'factor_email');

if ($expectedunknown) {
$this->assertContains($unknownstr, $email);
$this->assertStringContainsString($unknownstr, $email);
} else {
// Ideally we would test the email contains the correct geo info,
// but since the geo location of a real IP address can change
// we instead test that the unknown message is not there.
$this->assertNotContains($unknownstr, $email);
$this->assertStringNotContainsString($unknownstr, $email);
}
}
}

0 comments on commit 0a104c7

Please sign in to comment.