diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-06-23 14:13:45 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-06-23 14:21:04 +0300 |
commit | 657551c399ed1211a516d3bca98834d44150e5fb (patch) | |
tree | 0376e212dfbd60cb9d7194e37b2aa9adb319b1a8 /tests | |
parent | 15726c08f12c9ed13667321eb114e0a5cc3d05f4 (diff) |
Actually run the unit test
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/PermissionManagerTest.php | 14 | ||||
-rw-r--r-- | tests/phpunit.xml | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/tests/lib/PermissionManagerTest.php b/tests/lib/PermissionManagerTest.php index ed498e63..60b654dd 100644 --- a/tests/lib/PermissionManagerTest.php +++ b/tests/lib/PermissionManagerTest.php @@ -25,17 +25,19 @@ use OCA\Richdocuments\PermissionManager; use OCP\IConfig; use OCP\IGroupManager; use OCP\IUser; +use PHPUnit\Framework\MockObject\MockBuilder; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class PermissionManagerTest extends TestCase { - /** @var IConfig|\PHPUnit_Framework_MockObject_MockBuilder */ + /** @var IConfig|MockObject */ private $config; - /** @var IGroupManager|\PHPUnit_Framework_MockObject_MockBuilder */ + /** @var IGroupManager|MockObject */ private $groupManager; /** @var PermissionManager */ private $permissionManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->groupManager = $this->createMock(IGroupManager::class); @@ -43,7 +45,7 @@ class PermissionManagerTest extends TestCase { } public function testIsEnabledForUserEnabledNoRestrictions() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockBuilder $user */ + /** @var IUser|MockObject $user */ $user = $this->createMock(IUser::class); $this->config @@ -56,7 +58,7 @@ class PermissionManagerTest extends TestCase { } public function testIsEnabledForUserEnabledNotInGroup() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockBuilder $user */ + /** @var IUser|MockBuilder $user */ $user = $this->createMock(IUser::class); $user ->expects($this->once()) @@ -89,7 +91,7 @@ class PermissionManagerTest extends TestCase { } public function testIsEnabledForUserEnabledInGroup() { - /** @var IUser|\PHPUnit_Framework_MockObject_MockBuilder $user */ + /** @var IUser|MockObject $user */ $user = $this->createMock(IUser::class); $user ->expects($this->once()) diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 6b314461..250b40a8 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -5,8 +5,8 @@ timeoutForMediumTests="900" timeoutForLargeTests="900" > - <testsuite name='ownCloud - Richdocuments App Tests'> - <directory suffix='test.php'>.</directory> + <testsuite name='Richdocuments App Tests'> + <directory suffix='.php'>./lib</directory> </testsuite> <!-- filters for code coverage --> <filter> |