diff options
Diffstat (limited to 'tests/Unit/Controller/FolderApiControllerTest.php')
-rw-r--r-- | tests/Unit/Controller/FolderApiControllerTest.php | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/tests/Unit/Controller/FolderApiControllerTest.php b/tests/Unit/Controller/FolderApiControllerTest.php index 311212169..de62b887a 100644 --- a/tests/Unit/Controller/FolderApiControllerTest.php +++ b/tests/Unit/Controller/FolderApiControllerTest.php @@ -20,9 +20,9 @@ use OCA\News\Service\FolderService; use OCA\News\Service\ItemService; use \OCP\AppFramework\Http; -use \OCA\News\Service\ServiceNotFoundException; -use \OCA\News\Service\ServiceConflictException; -use \OCA\News\Service\ServiceValidationException; +use \OCA\News\Service\Exceptions\ServiceNotFoundException; +use \OCA\News\Service\Exceptions\ServiceConflictException; +use \OCA\News\Service\Exceptions\ServiceValidationException; use \OCA\News\Db\Folder; use OCP\IRequest; @@ -38,25 +38,22 @@ class FolderApiControllerTest extends TestCase private $folderService; private $itemService; private $folderAPI; - private $appName; - private $userSession; private $user; - private $request; private $msg; protected function setUp(): void { - $this->appName = 'news'; - $this->request = $this->getMockBuilder(IRequest::class) + $appName = 'news'; + $request = $this->getMockBuilder(IRequest::class) ->disableOriginalConstructor() ->getMock(); - $this->userSession = $this->getMockBuilder(IUserSession::class) + $userSession = $this->getMockBuilder(IUserSession::class) ->disableOriginalConstructor() ->getMock(); $this->user = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); - $this->userSession->expects($this->any()) + $userSession->expects($this->any()) ->method('getUser') ->will($this->returnValue($this->user)); $this->user->expects($this->any()) @@ -69,9 +66,9 @@ class FolderApiControllerTest extends TestCase ->disableOriginalConstructor() ->getMock(); $this->folderAPI = new FolderApiController( - $this->appName, - $this->request, - $this->userSession, + $appName, + $request, + $userSession, $this->folderService, $this->itemService ); |