aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/updater
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-09-27 14:07:08 +0200
committerArthurHoaro <arthur@hoa.ro>2020-09-27 14:09:55 +0200
commitb1baca99f280570d0336b4d71ad1f9dca213a35b (patch)
tree518de2057da549d0baa982c6aa689aa813377774 /tests/updater
parent8f60e1206e45e67c96a7630d4ff94e72fe875f09 (diff)
downloadShaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.tar.gz
Shaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.tar.zst
Shaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.zip
Convert legacy PHPUnit @expected* to new ->expect*
Converted automatically using https://github.com/ArthurHoaro/convert-legacy-phpunit-expect
Diffstat (limited to 'tests/updater')
-rw-r--r--tests/updater/UpdaterTest.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/updater/UpdaterTest.php b/tests/updater/UpdaterTest.php
index 277f2fb0..5cfcd5db 100644
--- a/tests/updater/UpdaterTest.php
+++ b/tests/updater/UpdaterTest.php
@@ -89,10 +89,11 @@ class UpdaterTest extends TestCase
89 * Test errors in UpdaterUtils::write_updates_file(): empty updates file. 89 * Test errors in UpdaterUtils::write_updates_file(): empty updates file.
90 * 90 *
91 * @expectedException Exception 91 * @expectedException Exception
92 * @expectedExceptionMessageRegExp /Updates file path is not set(.*)/
93 */ 92 */
94 public function testWriteEmptyUpdatesFile() 93 public function testWriteEmptyUpdatesFile()
95 { 94 {
95 $this->expectExceptionMessageRegExp('/Updates file path is not set(.*)/');
96
96 UpdaterUtils::write_updates_file('', array('test')); 97 UpdaterUtils::write_updates_file('', array('test'));
97 } 98 }
98 99
@@ -100,10 +101,11 @@ class UpdaterTest extends TestCase
100 * Test errors in UpdaterUtils::write_updates_file(): not writable updates file. 101 * Test errors in UpdaterUtils::write_updates_file(): not writable updates file.
101 * 102 *
102 * @expectedException Exception 103 * @expectedException Exception
103 * @expectedExceptionMessageRegExp /Unable to write(.*)/
104 */ 104 */
105 public function testWriteUpdatesFileNotWritable() 105 public function testWriteUpdatesFileNotWritable()
106 { 106 {
107 $this->expectExceptionMessageRegExp('/Unable to write(.*)/');
108
107 $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt'; 109 $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt';
108 touch($updatesFile); 110 touch($updatesFile);
109 chmod($updatesFile, 0444); 111 chmod($updatesFile, 0444);
@@ -168,11 +170,11 @@ class UpdaterTest extends TestCase
168 170
169 /** 171 /**
170 * Test Update failed. 172 * Test Update failed.
171 *
172 * @expectedException \Exception
173 */ 173 */
174 public function testUpdateFailed() 174 public function testUpdateFailed()
175 { 175 {
176 $this->expectException(\Exception::class);
177
176 $updates = array( 178 $updates = array(
177 'updateMethodDummy1', 179 'updateMethodDummy1',
178 'updateMethodDummy2', 180 'updateMethodDummy2',