diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2019-10-21 13:40:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-21 13:40:36 +0200 |
commit | 923735021b35d08aadf00cb30e3e9eda42f50a50 (patch) | |
tree | 39a7c91f16135278f8a8155e933600214a30eb05 /apps/dav | |
parent | 2905e8d6cf9979c54fe9f0ca88f21f291ec7d4ea (diff) | |
parent | e8095cf7372a8e95ca0f57ada1ddb8712aebce9a (diff) | |
download | nextcloud-server-923735021b35d08aadf00cb30e3e9eda42f50a50.tar.gz nextcloud-server-923735021b35d08aadf00cb30e3e9eda42f50a50.zip |
Merge pull request #17568 from nextcloud/fix/noid/move-away-from-deprecated-event
use OCP\EventDispatcher\Event over Symfony's deprecated Event
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/tests/unit/Comments/RootCollectionTest.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/dav/tests/unit/Comments/RootCollectionTest.php b/apps/dav/tests/unit/Comments/RootCollectionTest.php index fde74dc46e7..2391d885baf 100644 --- a/apps/dav/tests/unit/Comments/RootCollectionTest.php +++ b/apps/dav/tests/unit/Comments/RootCollectionTest.php @@ -25,6 +25,8 @@ namespace OCA\DAV\Tests\unit\Comments; +use OC\EventDispatcher\EventDispatcher; +use OC\EventDispatcher\SymfonyAdapter; use OCA\DAV\Comments\EntityTypeCollection as EntityTypeCollectionImplementation; use OCP\Comments\CommentsEntityEvent; use OCP\Comments\ICommentsManager; @@ -32,7 +34,7 @@ use OCP\ILogger; use OCP\IUser; use OCP\IUserManager; use OCP\IUserSession; -use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; class RootCollectionTest extends \Test\TestCase { @@ -46,7 +48,7 @@ class RootCollectionTest extends \Test\TestCase { protected $collection; /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */ protected $userSession; - /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ + /** @var EventDispatcherInterface */ protected $dispatcher; /** @var \OCP\IUser|\PHPUnit_Framework_MockObject_MockObject */ protected $user; @@ -67,10 +69,17 @@ class RootCollectionTest extends \Test\TestCase { $this->userSession = $this->getMockBuilder(IUserSession::class) ->disableOriginalConstructor() ->getMock(); - $this->dispatcher = new EventDispatcher(); $this->logger = $this->getMockBuilder(ILogger::class) ->disableOriginalConstructor() ->getMock(); + $this->dispatcher = new SymfonyAdapter( + new EventDispatcher( + new \Symfony\Component\EventDispatcher\EventDispatcher(), + \OC::$server, + $this->logger + ), + $this->logger + ); $this->collection = new \OCA\DAV\Comments\RootCollection( $this->commentsManager, |