]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/updater/UpdaterTest.php
Convert legacy PHPUnit @expected* to new ->expect*
[github/shaarli/Shaarli.git] / tests / updater / UpdaterTest.php
index 277f2fb08c193b4f55874029e1edacb98595b7d2..5cfcd5db4f74c54bc0078129b86afbd4cb7ae26f 100644 (file)
@@ -89,10 +89,11 @@ class UpdaterTest extends TestCase
      * Test errors in UpdaterUtils::write_updates_file(): empty updates file.
      *
      * @expectedException              Exception
-     * @expectedExceptionMessageRegExp /Updates file path is not set(.*)/
      */
     public function testWriteEmptyUpdatesFile()
     {
+        $this->expectExceptionMessageRegExp('/Updates file path is not set(.*)/');
+
         UpdaterUtils::write_updates_file('', array('test'));
     }
 
@@ -100,10 +101,11 @@ class UpdaterTest extends TestCase
      * Test errors in UpdaterUtils::write_updates_file(): not writable updates file.
      *
      * @expectedException              Exception
-     * @expectedExceptionMessageRegExp /Unable to write(.*)/
      */
     public function testWriteUpdatesFileNotWritable()
     {
+        $this->expectExceptionMessageRegExp('/Unable to write(.*)/');
+
         $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt';
         touch($updatesFile);
         chmod($updatesFile, 0444);
@@ -168,11 +170,11 @@ class UpdaterTest extends TestCase
 
     /**
      * Test Update failed.
-     *
-     * @expectedException \Exception
      */
     public function testUpdateFailed()
     {
+        $this->expectException(\Exception::class);
+
         $updates = array(
             'updateMethodDummy1',
             'updateMethodDummy2',