aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/legacy/LegacyUpdaterTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/legacy/LegacyUpdaterTest.php')
-rw-r--r--tests/legacy/LegacyUpdaterTest.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/legacy/LegacyUpdaterTest.php b/tests/legacy/LegacyUpdaterTest.php
index 9b693dcb..acfac530 100644
--- a/tests/legacy/LegacyUpdaterTest.php
+++ b/tests/legacy/LegacyUpdaterTest.php
@@ -82,10 +82,11 @@ class LegacyUpdaterTest extends \PHPUnit\Framework\TestCase
82 * Test errors in UpdaterUtils::write_updates_file(): empty updates file. 82 * Test errors in UpdaterUtils::write_updates_file(): empty updates file.
83 * 83 *
84 * @expectedException Exception 84 * @expectedException Exception
85 * @expectedExceptionMessageRegExp /Updates file path is not set(.*)/
86 */ 85 */
87 public function testWriteEmptyUpdatesFile() 86 public function testWriteEmptyUpdatesFile()
88 { 87 {
88 $this->expectExceptionMessageRegExp('/Updates file path is not set(.*)/');
89
89 UpdaterUtils::write_updates_file('', array('test')); 90 UpdaterUtils::write_updates_file('', array('test'));
90 } 91 }
91 92
@@ -93,10 +94,11 @@ class LegacyUpdaterTest extends \PHPUnit\Framework\TestCase
93 * Test errors in UpdaterUtils::write_updates_file(): not writable updates file. 94 * Test errors in UpdaterUtils::write_updates_file(): not writable updates file.
94 * 95 *
95 * @expectedException Exception 96 * @expectedException Exception
96 * @expectedExceptionMessageRegExp /Unable to write(.*)/
97 */ 97 */
98 public function testWriteUpdatesFileNotWritable() 98 public function testWriteUpdatesFileNotWritable()
99 { 99 {
100 $this->expectExceptionMessageRegExp('/Unable to write(.*)/');
101
100 $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt'; 102 $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt';
101 touch($updatesFile); 103 touch($updatesFile);
102 chmod($updatesFile, 0444); 104 chmod($updatesFile, 0444);
@@ -161,11 +163,11 @@ class LegacyUpdaterTest extends \PHPUnit\Framework\TestCase
161 163
162 /** 164 /**
163 * Test Update failed. 165 * Test Update failed.
164 *
165 * @expectedException \Exception
166 */ 166 */
167 public function testUpdateFailed() 167 public function testUpdateFailed()
168 { 168 {
169 $this->expectException(\Exception::class);
170
169 $updates = array( 171 $updates = array(
170 'updateMethodDummy1', 172 'updateMethodDummy1',
171 'updateMethodDummy2', 173 'updateMethodDummy2',