diff options
author | Joas Schilling <coding@schilljs.com> | 2018-01-24 18:10:16 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-01-24 18:10:16 +0100 |
commit | 870023365c928e6bc3bd39d0d7f9b4d976dad33e (patch) | |
tree | 74c1438392d2101c154a80d4f4b9d4777c77bd1a /apps/dav/tests | |
parent | c3424df1f026854ed8adbfdf8d96da7a6562a8dd (diff) | |
download | nextcloud-server-870023365c928e6bc3bd39d0d7f9b4d976dad33e.tar.gz nextcloud-server-870023365c928e6bc3bd39d0d7f9b4d976dad33e.zip |
Fix "Undefined method setExpectedException()"
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav/tests')
4 files changed, 8 insertions, 6 deletions
diff --git a/apps/dav/tests/unit/AppInfo/PluginManagerTest.php b/apps/dav/tests/unit/AppInfo/PluginManagerTest.php index 89c972acd26..a4fcef92511 100644 --- a/apps/dav/tests/unit/AppInfo/PluginManagerTest.php +++ b/apps/dav/tests/unit/AppInfo/PluginManagerTest.php @@ -22,8 +22,8 @@ namespace OCA\DAV\Tests\unit\AppInfo; +use OC\App\AppManager; use Test\TestCase; -use OCP\App\IAppManager; use OC\ServerContainer; use OCA\DAV\AppInfo\PluginManager; @@ -37,7 +37,7 @@ class PluginManagerTest extends TestCase { $server = $this->createMock(ServerContainer::class); - $appManager = $this->createMock(IAppManager::class); + $appManager = $this->createMock(AppManager::class); $appManager->method('getInstalledApps') ->willReturn(['adavapp', 'adavapp2']); diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index 0b8978a0409..fd048240467 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -36,6 +36,7 @@ use OCP\IL10N; use Sabre\DAV\PropPatch; use Sabre\DAV\Xml\Property\Href; use Sabre\DAVACL\IACL; +use Sabre\DAV\Exception\NotFound; /** * Class CalDavBackendTest @@ -526,7 +527,7 @@ EOD; $calendar->setPublishStatus(false); $this->assertEquals(false, $calendar->getPublishStatus()); - $this->setExpectedException('Sabre\DAV\Exception\NotFound'); + $this->expectException(NotFound::class); $this->backend->getPublicCalendar($publicCalendarURI); } diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index 800bdfd3598..e1c4bc05dc1 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -29,6 +29,7 @@ namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\User\User; +use OCA\DAV\Connector\Sabre\Directory; use OCA\DAV\Connector\Sabre\File; use OCA\DAV\Connector\Sabre\FilesPlugin; use OCA\DAV\Connector\Sabre\Node; @@ -319,7 +320,7 @@ class FilesPluginTest extends TestCase { } public function testGetPropertiesForRootDirectory() { - /** @var \OCA\DAV\Connector\Sabre\Directory | \PHPUnit_Framework_MockObject_MockObject $node */ + /** @var \OCA\DAV\Connector\Sabre\Directory|\PHPUnit_Framework_MockObject_MockObject $node */ $node = $this->getMockBuilder(Directory::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php index 18c774883c0..b9a6efdcc22 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php @@ -251,7 +251,7 @@ class SystemTagNodeTest extends \Test\TestCase { ->method('deleteTags') ->with('1'); if (!$isAdmin) { - $this->setExpectedException(Forbidden::class); + $this->expectException(Forbidden::class); } $this->getTagNode($isAdmin, $tag)->delete(); } @@ -282,7 +282,7 @@ class SystemTagNodeTest extends \Test\TestCase { $this->tagManager->expects($this->never()) ->method('deleteTags'); - $this->setExpectedException($expectedException); + $this->expectException($expectedException); $this->getTagNode(false, $tag)->delete(); } |