aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/updater/UpdaterTest.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/updater/UpdaterTest.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/updater/UpdaterTest.php')
-rw-r--r--tests/updater/UpdaterTest.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/updater/UpdaterTest.php b/tests/updater/UpdaterTest.php
index 5cfcd5db..a6280b8c 100644
--- a/tests/updater/UpdaterTest.php
+++ b/tests/updater/UpdaterTest.php
@@ -2,11 +2,11 @@
2namespace Shaarli\Updater; 2namespace Shaarli\Updater;
3 3
4use Exception; 4use Exception;
5use PHPUnit\Framework\TestCase;
6use Shaarli\Bookmark\BookmarkFileService; 5use Shaarli\Bookmark\BookmarkFileService;
7use Shaarli\Bookmark\BookmarkServiceInterface; 6use Shaarli\Bookmark\BookmarkServiceInterface;
8use Shaarli\Config\ConfigManager; 7use Shaarli\Config\ConfigManager;
9use Shaarli\History; 8use Shaarli\History;
9use Shaarli\TestCase;
10 10
11 11
12/** 12/**
@@ -87,11 +87,10 @@ class UpdaterTest extends TestCase
87 87
88 /** 88 /**
89 * Test errors in UpdaterUtils::write_updates_file(): empty updates file. 89 * Test errors in UpdaterUtils::write_updates_file(): empty updates file.
90 *
91 * @expectedException Exception
92 */ 90 */
93 public function testWriteEmptyUpdatesFile() 91 public function testWriteEmptyUpdatesFile()
94 { 92 {
93 $this->expectException(\Exception::class);
95 $this->expectExceptionMessageRegExp('/Updates file path is not set(.*)/'); 94 $this->expectExceptionMessageRegExp('/Updates file path is not set(.*)/');
96 95
97 UpdaterUtils::write_updates_file('', array('test')); 96 UpdaterUtils::write_updates_file('', array('test'));
@@ -99,11 +98,10 @@ class UpdaterTest extends TestCase
99 98
100 /** 99 /**
101 * Test errors in UpdaterUtils::write_updates_file(): not writable updates file. 100 * Test errors in UpdaterUtils::write_updates_file(): not writable updates file.
102 *
103 * @expectedException Exception
104 */ 101 */
105 public function testWriteUpdatesFileNotWritable() 102 public function testWriteUpdatesFileNotWritable()
106 { 103 {
104 $this->expectException(\Exception::class);
107 $this->expectExceptionMessageRegExp('/Unable to write(.*)/'); 105 $this->expectExceptionMessageRegExp('/Unable to write(.*)/');
108 106
109 $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt'; 107 $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt';