Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-06-23 14:13:45 +0300
committerJulius Härtl <jus@bitgrid.net>2020-06-23 14:21:04 +0300
commit657551c399ed1211a516d3bca98834d44150e5fb (patch)
tree0376e212dfbd60cb9d7194e37b2aa9adb319b1a8 /tests
parent15726c08f12c9ed13667321eb114e0a5cc3d05f4 (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.php14
-rw-r--r--tests/phpunit.xml4
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>