X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FApplicationUtilsTest.php;h=a232b351f4cfdae5c63c4d31553f055500a4111b;hb=2f87bfdc69052cd64e84b1d2b97a0af14991a385;hp=421d2dd9dff6c454733d0f2da7127044fe1a813a;hpb=6cdca9562c7685e9a0eb77b51584d0cc458c44e0;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php index 421d2dd9..a232b351 100644 --- a/tests/ApplicationUtilsTest.php +++ b/tests/ApplicationUtilsTest.php @@ -8,7 +8,7 @@ require_once 'tests/utils/FakeApplicationUtils.php'; /** * Unitary tests for Shaarli utilities */ -class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase +class ApplicationUtilsTest extends \Shaarli\TestCase { protected static $testUpdateFile = 'sandbox/update.txt'; protected static $testVersion = '0.5.0'; @@ -144,10 +144,10 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase /** * Test update checks - invalid Git branch - * @expectedException Exception */ public function testCheckUpdateInvalidGitBranch() { + $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/Invalid branch selected for updates/'); ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable'); @@ -261,10 +261,10 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase /** * Check a unsupported PHP version - * @expectedException Exception */ public function testCheckSupportedPHPVersion51() { + $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/'); $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.1.0')); @@ -272,10 +272,10 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase /** * Check another unsupported PHP version - * @expectedException Exception */ public function testCheckSupportedPHPVersion52() { + $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/'); $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.2'));