diff options
author | Daniel Opitz <git@copynpaste.de> | 2018-10-16 22:37:48 +0200 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2018-12-04 17:10:46 +0100 |
commit | e158cc1d3b1fb33de5aaa1aaac0c7828016fb7b9 (patch) | |
tree | 4d3b4da643a428f259ca9fe1c63d97f8cecfb5fc /tests/Unit/Controller/UserApiControllerTest.php | |
parent | 5c7fdb08534018ba86ec4a38f45b63cbbf67a72f (diff) |
use magic class constant instead of classname strings
Diffstat (limited to 'tests/Unit/Controller/UserApiControllerTest.php')
-rw-r--r-- | tests/Unit/Controller/UserApiControllerTest.php | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/tests/Unit/Controller/UserApiControllerTest.php b/tests/Unit/Controller/UserApiControllerTest.php index d562329f3..d9df73fe7 100644 --- a/tests/Unit/Controller/UserApiControllerTest.php +++ b/tests/Unit/Controller/UserApiControllerTest.php @@ -14,6 +14,11 @@ namespace OCA\News\Tests\Unit\Controller; use OCA\News\Controller\UserApiController; +use OCP\Files\File; +use OCP\Files\IRootFolder; +use OCP\IRequest; +use OCP\IUser; +use OCP\IUserSession; use PHPUnit\Framework\TestCase; @@ -31,29 +36,19 @@ class UserApiControllerTest extends TestCase protected function setUp() { $this->appName = 'news'; - $this->request = $this->getMockBuilder( - '\OCP\IRequest' - ) + $this->request = $this->getMockBuilder(IRequest::class) ->disableOriginalConstructor() ->getMock(); - $this->rootFolder = $this->getMockBuilder( - '\OCP\Files\IRootFolder' - ) + $this->rootFolder = $this->getMockBuilder(IRootFolder::class) ->disableOriginalConstructor() ->getMock(); - $this->file = $this->getMockBuilder( - '\OCP\Files\File' - ) + $this->file = $this->getMockBuilder(File::class) ->disableOriginalConstructor() ->getMock(); - $this->userSession = $this->getMockBuilder( - '\OCP\IUserSession' - ) + $this->userSession = $this->getMockBuilder(IUserSession::class) ->disableOriginalConstructor() ->getMock(); - $this->user = $this->getMockBuilder( - '\OCP\IUser' - ) + $this->user = $this->getMockBuilder(IUser::class) ->disableOriginalConstructor() ->getMock(); $this->controller = new UserApiController( |