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/UtilityApiControllerTest.php | |
parent | 5c7fdb08534018ba86ec4a38f45b63cbbf67a72f (diff) |
use magic class constant instead of classname strings
Diffstat (limited to 'tests/Unit/Controller/UtilityApiControllerTest.php')
-rw-r--r-- | tests/Unit/Controller/UtilityApiControllerTest.php | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/tests/Unit/Controller/UtilityApiControllerTest.php b/tests/Unit/Controller/UtilityApiControllerTest.php index 8ae25a43d..37070b160 100644 --- a/tests/Unit/Controller/UtilityApiControllerTest.php +++ b/tests/Unit/Controller/UtilityApiControllerTest.php @@ -16,6 +16,12 @@ namespace OCA\News\Tests\Unit\Controller; use OCA\News\Controller\UtilityApiController; +use OCA\News\Service\StatusService; +use OCA\News\Utility\Updater; +use OCP\IConfig; +use OCP\IRequest; +use OCP\IUser; +use OCP\IUserSession; use PHPUnit\Framework\TestCase; @@ -34,37 +40,25 @@ class UtilityApiControllerTest extends TestCase protected function setUp() { $this->appName = 'news'; - $this->settings = $this->getMockBuilder( - '\OCP\IConfig' - ) + $this->settings = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); - $this->request = $this->getMockBuilder( - '\OCP\IRequest' - ) + $this->request = $this->getMockBuilder(IRequest::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->userSession->expects($this->any()) ->method('getUser') ->will($this->returnValue($this->user)); - $this->updater = $this->getMockBuilder( - '\OCA\News\Utility\Updater' - ) + $this->updater = $this->getMockBuilder(Updater::class) ->disableOriginalConstructor() ->getMock(); - $this->status = $this->getMockBuilder( - '\OCA\News\Service\StatusService' - ) + $this->status = $this->getMockBuilder(StatusService::class) ->disableOriginalConstructor() ->getMock(); $this->newsAPI = new UtilityApiController( |