From 1f2e18cb42f16052622fa241059af52fa5023629 Mon Sep 17 00:00:00 2001 From: Steve Grunwell Date: Thu, 16 Jul 2020 15:05:53 +0000 Subject: [PATCH] Use assertContains() instead of assertStringContainsString() The latter method wasn't introduced until PHPUnit 7.5, which means we'd either need to polyfill the method for PHPUnit 6.x (required for PHP 7.0) *or* just use `assertContains()` until we're able to drop PHP 7.0. --- tests/SettingsTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/SettingsTest.php b/tests/SettingsTest.php index 947aa7c..291ace8 100644 --- a/tests/SettingsTest.php +++ b/tests/SettingsTest.php @@ -91,7 +91,7 @@ public function a_notice_should_be_shown_if_there_have_been_orders_in_the_curren $limiter = new OrderLimiter(); $limiter->init(); - $this->assertStringContainsString( + $this->assertContains( '
', $this->get_setting_by_id( 'limit-orders-general', new Settings( $limiter ) )['desc'], 'Expected to see a notice about limits being recalculated.' @@ -111,7 +111,7 @@ public function a_notice_should_not_be_shown_if_there_have_not_been_any_orders_i $limiter = new OrderLimiter(); $limiter->init(); - $this->assertStringNotContainsString( + $this->assertNotContains( '
', $this->get_setting_by_id( 'limit-orders-general', new Settings( $limiter ) )['desc'], 'Did not expect to see a notice about limits being recalculated.'