From b1baca99f280570d0336b4d71ad1f9dca213a35b Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 27 Sep 2020 14:07:08 +0200 Subject: Convert legacy PHPUnit @expected* to new ->expect* Converted automatically using https://github.com/ArthurHoaro/convert-legacy-phpunit-expect --- tests/ApplicationUtilsTest.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/ApplicationUtilsTest.php') diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php index 57359196..421d2dd9 100644 --- a/tests/ApplicationUtilsTest.php +++ b/tests/ApplicationUtilsTest.php @@ -145,10 +145,11 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase /** * Test update checks - invalid Git branch * @expectedException Exception - * @expectedExceptionMessageRegExp /Invalid branch selected for updates/ */ public function testCheckUpdateInvalidGitBranch() { + $this->expectExceptionMessageRegExp('/Invalid branch selected for updates/'); + ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable'); } @@ -261,20 +262,22 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase /** * Check a unsupported PHP version * @expectedException Exception - * @expectedExceptionMessageRegExp /Your PHP version is obsolete/ */ public function testCheckSupportedPHPVersion51() { + $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/'); + $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.1.0')); } /** * Check another unsupported PHP version * @expectedException Exception - * @expectedExceptionMessageRegExp /Your PHP version is obsolete/ */ public function testCheckSupportedPHPVersion52() { + $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/'); + $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.2')); } -- cgit v1.2.3