Skip to content

Commit 65e8c45

Browse files
committed
chore: minor unit test reorg
Signed-off-by: Robin Appelman <[email protected]>
1 parent 1fee962 commit 65e8c45

File tree

8 files changed

+336
-473
lines changed

8 files changed

+336
-473
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"config": {
33
"platform": {
4-
"php": "8.1"
4+
"php": "8.0"
55
},
66
"allow-plugins": {
77
"bamarni/composer-bin-plugin": true

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/bootstrap.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
55
* SPDX-License-Identifier: AGPL-3.0-or-later
66
*/
7-
define('PHPUNIT_RUN', 1);
7+
if (!defined('PHPUNIT_RUN')) {
8+
define('PHPUNIT_RUN', 1);
9+
}
810

911
require_once __DIR__ . '/../../../lib/base.php';
1012

1113
\OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true);
12-
\OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true);
1314

14-
OC_App::loadApp('notify_push');
15+
\OC_App::loadApp('notify_push');
1516

1617
OC_Hook::clear();
File renamed without changes.
File renamed without changes.

tests/phpunit.xml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
- SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
3+
- SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
44
- SPDX-License-Identifier: AGPL-3.0-or-later
55
-->
6-
<phpunit bootstrap="bootstrap.php"
7-
timeoutForSmallTests="900"
8-
timeoutForMediumTests="900"
9-
timeoutForLargeTests="900"
10-
convertDeprecationsToExceptions="true"
11-
>
12-
<testsuite name='Nextcloud - Notify Push App Tests'>
13-
<directory suffix='.php'>.</directory>
6+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
bootstrap="bootstrap.php"
8+
verbose="true"
9+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd">
10+
<testsuite name="unit">
11+
<directory suffix="Test.php">./</directory>
1412
</testsuite>
15-
<filter>
16-
<whitelist>
17-
<directory suffix=".php">../</directory>
18-
<exclude>
19-
<directory suffix=".php">../tests
20-
</directory>
21-
</exclude>
22-
</whitelist>
23-
</filter>
13+
<coverage>
14+
<include>
15+
<directory suffix=".php">./tests/lib</directory>
16+
</include>
17+
</coverage>
2418
</phpunit>

vendor-bin/phpunit/composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"config": {
3-
"platform": {
4-
"php": "8.1"
5-
},
6-
"sort-packages": true
7-
},
8-
"require-dev": {
9-
"christophwurst/nextcloud_testing": "^1.0.0"
10-
}
2+
"config": {
3+
"platform": {
4+
"php": "8.0"
5+
},
6+
"sort-packages": true
7+
},
8+
"require-dev": {
9+
"phpunit/phpunit": "^9.6.13"
10+
}
1111
}

0 commit comments

Comments
 (0)