aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ApplicationUtilsTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-10-03 12:59:16 +0200
committerGitHub <noreply@github.com>2020-10-03 12:59:16 +0200
commit7b18876361f2223672f3a2cac9fc0da16d12d69f (patch)
tree03a655c46d801d56211fb05cc2930824dace4565 /tests/ApplicationUtilsTest.php
parentee07b7283faa197fc062ed85f4f96f98e8e77b03 (diff)
parentd246e2c5129fe8d3f8e1429b4e8ff8e3e486c779 (diff)
downloadShaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.tar.gz
Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.tar.zst
Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.zip
Merge pull request #1575 from ArthurHoaro/feature/php8
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'));