diff options
Diffstat (limited to 'apps/files_sharing/tests/Controller/ShareInfoControllerTest.php')
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareInfoControllerTest.php | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php b/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php index f2df74fd01b..571647829f2 100644 --- a/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php @@ -15,15 +15,13 @@ use OCP\IRequest; use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager as ShareManager; use OCP\Share\IShare; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class ShareInfoControllerTest extends TestCase { - /** @var ShareInfoController */ - private $controller; - - /** @var ShareManager|\PHPUnit\Framework\MockObject\MockObject */ - private $shareManager; + protected ShareInfoController $controller; + protected ShareManager&MockObject $shareManager; protected function setUp(): void { @@ -31,14 +29,11 @@ class ShareInfoControllerTest extends TestCase { $this->shareManager = $this->createMock(ShareManager::class); - $this->controller = $this->getMockBuilder(ShareInfoController::class) - ->setConstructorArgs([ - 'files_sharing', - $this->createMock(IRequest::class), - $this->shareManager - ]) - ->setMethods(['addROWrapper']) - ->getMock(); + $this->controller = new ShareInfoController( + 'files_sharing', + $this->createMock(IRequest::class), + $this->shareManager + ); } public function testNoShare(): void { |