From 8d4aaa3a6fbfbc4f4f548c4622f081ca72bc8bd8 Mon Sep 17 00:00:00 2001 From: Basil Suter Date: Thu, 16 Mar 2023 10:33:23 +0000 Subject: [PATCH] drop 7.2 & 7.3 --- .github/workflows/tests.yml | 4 ++-- tests/controllers/DefaultControllerTest.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc0b153..a21bae6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,7 +54,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.4', '8.0', '8.1', '8.2'] steps: ## checkout the repoistory @@ -77,7 +77,7 @@ jobs: ## run unit tests - name: PHP Unit tests for PHP run: vendor/bin/phpunit --verbose --configuration actions.phpunit.xml - if: matrix.php == '7.2' || matrix.php == '7.3' || matrix.php == '8.0' || matrix.php == '8.1' || matrix.php == '8.2' + if: matrix.php == '8.0' || matrix.php == '8.1' || matrix.php == '8.2' ## unit test with coverage - name: PHP Unit tests for PHP 7.4 Coverage diff --git a/tests/controllers/DefaultControllerTest.php b/tests/controllers/DefaultControllerTest.php index e7b8269..8e1a861 100644 --- a/tests/controllers/DefaultControllerTest.php +++ b/tests/controllers/DefaultControllerTest.php @@ -157,7 +157,7 @@ public function testEmailMessage() EOT; $ctrl = new DefaultController('default', Yii::$app->getModule('contactform')); - $this->assertContains($mail, $ctrl->generateMailMessage($model)); + $this->assertStringContainsString($mail, $ctrl->generateMailMessage($model)); } public function testEmailArrayMessage() @@ -170,7 +170,7 @@ public function testEmailArrayMessage() EOT; $ctrl = new DefaultController('default', Yii::$app->getModule('contactform')); - $this->assertContains($mail, $ctrl->generateMailMessage($model)); + $this->assertStringContainsString($mail, $ctrl->generateMailMessage($model)); } public function testGenerateMailAltBody() @@ -183,7 +183,7 @@ public function testGenerateMailAltBody() $ctrl = new DefaultController('default', Yii::$app->getModule('contactform')); // in order to see the brs in tests we wrap with nl2br. $altBody = $ctrl->generateMailAltBody($model); - $this->assertContains('Foo: bar, foo + $this->assertStringContainsString('Foo: bar, foo Label for Field: Content', $altBody); } @@ -198,7 +198,7 @@ public function testGenerateMailAltBodyWithAttributesLAbels() $ctrl = new DefaultController('default', $module); // in order to see the brs in tests we wrap with nl2br. $altBody = $ctrl->generateMailAltBody($model); - $this->assertContains('The Label: No', $altBody); + $this->assertStringContainsString('The Label: No', $altBody); } public function testModuleMailTemplateProperty() @@ -210,7 +210,7 @@ public function testModuleMailTemplateProperty() $module->mailTitle = '-'; $module->mailTemplate = '

foo{title}bar

'; $ctrl = new DefaultController('default', $module); - $this->assertSame('

foo-bar

', $ctrl->generateMailMessage($model)); + $this->assertStringContainsString('

foo-bar

', $ctrl->generateMailMessage($model)); } /**