X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FApplicationUtilsTest.php;h=7ad1d34c0c5f54da31a49fc4f1d7bb5fe9732f8e;hb=a5a9cf23acd1248585173aa32757d9720b5f2d62;hp=fe5f84ce674f8dadcf195793b0ec61c0d807891b;hpb=1004742f09b55ff781c13745781b9a7e90986faa;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php index fe5f84ce..7ad1d34c 100644 --- a/tests/ApplicationUtilsTest.php +++ b/tests/ApplicationUtilsTest.php @@ -1,33 +1,14 @@ expectExceptionMessageRegExp('/Invalid branch selected for updates/'); + ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable'); } @@ -272,29 +254,31 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase public function testCheckSupportedPHPVersion() { $minVersion = '5.3'; - ApplicationUtils::checkPHPVersion($minVersion, '5.4.32'); - ApplicationUtils::checkPHPVersion($minVersion, '5.5'); - ApplicationUtils::checkPHPVersion($minVersion, '5.6.10'); + $this->assertTrue(ApplicationUtils::checkPHPVersion($minVersion, '5.4.32')); + $this->assertTrue(ApplicationUtils::checkPHPVersion($minVersion, '5.5')); + $this->assertTrue(ApplicationUtils::checkPHPVersion($minVersion, '5.6.10')); } /** * Check a unsupported PHP version * @expectedException Exception - * @expectedExceptionMessageRegExp /Your PHP version is obsolete/ */ public function testCheckSupportedPHPVersion51() { - ApplicationUtils::checkPHPVersion('5.3', '5.1.0'); + $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() { - ApplicationUtils::checkPHPVersion('5.3', '5.2'); + $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/'); + + $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.2')); } /**