aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ApplicationUtilsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ApplicationUtilsTest.php')
-rw-r--r--tests/ApplicationUtilsTest.php8
1 files changed, 4 insertions, 4 deletions
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';
8/** 8/**
9 * Unitary tests for Shaarli utilities 9 * Unitary tests for Shaarli utilities
10 */ 10 */
11class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase 11class ApplicationUtilsTest extends \Shaarli\TestCase
12{ 12{
13 protected static $testUpdateFile = 'sandbox/update.txt'; 13 protected static $testUpdateFile = 'sandbox/update.txt';
14 protected static $testVersion = '0.5.0'; 14 protected static $testVersion = '0.5.0';
@@ -144,10 +144,10 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase
144 144
145 /** 145 /**
146 * Test update checks - invalid Git branch 146 * Test update checks - invalid Git branch
147 * @expectedException Exception
148 */ 147 */
149 public function testCheckUpdateInvalidGitBranch() 148 public function testCheckUpdateInvalidGitBranch()
150 { 149 {
150 $this->expectException(\Exception::class);
151 $this->expectExceptionMessageRegExp('/Invalid branch selected for updates/'); 151 $this->expectExceptionMessageRegExp('/Invalid branch selected for updates/');
152 152
153 ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable'); 153 ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable');
@@ -261,10 +261,10 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase
261 261
262 /** 262 /**
263 * Check a unsupported PHP version 263 * Check a unsupported PHP version
264 * @expectedException Exception
265 */ 264 */
266 public function testCheckSupportedPHPVersion51() 265 public function testCheckSupportedPHPVersion51()
267 { 266 {
267 $this->expectException(\Exception::class);
268 $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/'); 268 $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/');
269 269
270 $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.1.0')); 270 $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.1.0'));
@@ -272,10 +272,10 @@ class ApplicationUtilsTest extends \PHPUnit\Framework\TestCase
272 272
273 /** 273 /**
274 * Check another unsupported PHP version 274 * Check another unsupported PHP version
275 * @expectedException Exception
276 */ 275 */
277 public function testCheckSupportedPHPVersion52() 276 public function testCheckSupportedPHPVersion52()
278 { 277 {
278 $this->expectException(\Exception::class);
279 $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/'); 279 $this->expectExceptionMessageRegExp('/Your PHP version is obsolete/');
280 280
281 $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.2')); 281 $this->assertTrue(ApplicationUtils::checkPHPVersion('5.3', '5.2'));