aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ApplicationUtilsTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-09-27 14:07:08 +0200
committerArthurHoaro <arthur@hoa.ro>2020-09-27 14:09:55 +0200
commitb1baca99f280570d0336b4d71ad1f9dca213a35b (patch)
tree518de2057da549d0baa982c6aa689aa813377774 /tests/ApplicationUtilsTest.php
parent8f60e1206e45e67c96a7630d4ff94e72fe875f09 (diff)
downloadShaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.tar.gz
Shaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.tar.zst
Shaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.zip
Convert legacy PHPUnit @expected* to new ->expect*
Converted automatically using https://github.com/ArthurHoaro/convert-legacy-phpunit-expect
Diffstat (limited to 'tests/ApplicationUtilsTest.php')
-rw-r--r--tests/ApplicationUtilsTest.php9
1 files changed, 6 insertions, 3 deletions
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
145 /** 145 /**
146 * Test update checks - invalid Git branch 146 * Test update checks - invalid Git branch
147 * @expectedException Exception 147 * @expectedException Exception
148 * @expectedExceptionMessageRegExp /Invalid branch selected for updates/
149 */ 148 */
150 public function testCheckUpdateInvalidGitBranch() 149 public function testCheckUpdateInvalidGitBranch()
151 { 150 {
151 $this->expectExceptionMessageRegExp('/Invalid branch selected for updates/');
152
152 ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable'); 153 ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable');
153 } 154 }
154 155
@@ -261,20 +262,22 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase
261 /** 262 /**
262 * Check a unsupported PHP version 263 * Check a unsupported PHP version
263 * @expectedException Exception 264 * @expectedException Exception
264 * @expectedExceptionMessageRegExp /Your PHP version is obsolete/
265 */ 265 */
266 public function testCheckSupportedPHPVersion51() 266 public function testCheckSupportedPHPVersion51()
267 { 267 {
268 $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/');
269
268 $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.1.0')); 270 $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.1.0'));
269 } 271 }
270 272
271 /** 273 /**
272 * Check another unsupported PHP version 274 * Check another unsupported PHP version
273 * @expectedException Exception 275 * @expectedException Exception
274 * @expectedExceptionMessageRegExp /Your PHP version is obsolete/
275 */ 276 */
276 public function testCheckSupportedPHPVersion52() 277 public function testCheckSupportedPHPVersion52()
277 { 278 {
279 $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/');
280
278 $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.2')); 281 $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.2'));
279 } 282 }
280 283