diff options
Diffstat (limited to 'apps/dav/tests/unit/Comments/EntityCollectionTest.php')
-rw-r--r-- | apps/dav/tests/unit/Comments/EntityCollectionTest.php | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/apps/dav/tests/unit/Comments/EntityCollectionTest.php b/apps/dav/tests/unit/Comments/EntityCollectionTest.php index c4e343d49d4..0cac135843b 100644 --- a/apps/dav/tests/unit/Comments/EntityCollectionTest.php +++ b/apps/dav/tests/unit/Comments/EntityCollectionTest.php @@ -24,32 +24,39 @@ namespace OCA\DAV\Tests\unit\Comments; +use OCA\DAV\Comments\EntityCollection; +use OCP\Comments\IComment; +use OCP\Comments\ICommentsManager; +use OCP\ILogger; +use OCP\IUserManager; +use OCP\IUserSession; + class EntityCollectionTest extends \Test\TestCase { /** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */ protected $commentsManager; - /** @var \OCP\IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ protected $userManager; - /** @var \OCP\ILogger|\PHPUnit_Framework_MockObject_MockObject */ + /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; - /** @var \OCA\DAV\Comments\EntityCollection */ + /** @var EntityCollection */ protected $collection; - /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */ protected $userSession; public function setUp() { parent::setUp(); - $this->commentsManager = $this->getMockBuilder('\OCP\Comments\ICommentsManager') + $this->commentsManager = $this->getMockBuilder(ICommentsManager::class) ->disableOriginalConstructor() ->getMock(); - $this->userManager = $this->getMockBuilder('\OCP\IUserManager') + $this->userManager = $this->getMockBuilder(IUserManager::class) ->disableOriginalConstructor() ->getMock(); - $this->userSession = $this->getMockBuilder('\OCP\IUserSession') + $this->userSession = $this->getMockBuilder(IUserSession::class) ->disableOriginalConstructor() ->getMock(); - $this->logger = $this->getMockBuilder('\OCP\ILogger') + $this->logger = $this->getMockBuilder(ILogger::class) ->disableOriginalConstructor() ->getMock(); @@ -72,7 +79,7 @@ class EntityCollectionTest extends \Test\TestCase { ->method('get') ->with('55') ->will($this->returnValue( - $this->getMockBuilder('\OCP\Comments\IComment') + $this->getMockBuilder(IComment::class) ->disableOriginalConstructor() ->getMock() )); @@ -98,7 +105,7 @@ class EntityCollectionTest extends \Test\TestCase { ->method('getForObject') ->with('files', '19') ->will($this->returnValue([ - $this->getMockBuilder('\OCP\Comments\IComment') + $this->getMockBuilder(IComment::class) ->disableOriginalConstructor() ->getMock() ])); @@ -115,7 +122,7 @@ class EntityCollectionTest extends \Test\TestCase { ->method('getForObject') ->with('files', '19', 5, 15, $dt) ->will($this->returnValue([ - $this->getMockBuilder('\OCP\Comments\IComment') + $this->getMockBuilder(IComment::class) ->disableOriginalConstructor() ->getMock() ])); |