From 0a104c7d523e3d9789a5b389936902b13d5aa8e0 Mon Sep 17 00:00:00 2001 From: Owen Herbert Date: Thu, 31 Aug 2023 10:17:47 +1000 Subject: [PATCH] Update unit test functions --- factor/email/tests/factor_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/factor/email/tests/factor_test.php b/factor/email/tests/factor_test.php index 02b89c1d..faeb347d 100644 --- a/factor/email/tests/factor_test.php +++ b/factor/email/tests/factor_test.php @@ -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); } } }