Skip to content

Commit

Permalink
chore: minor unit test reorg
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Jan 15, 2025
1 parent 1fee962 commit 65e8c45
Show file tree
Hide file tree
Showing 8 changed files with 336 additions and 473 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"config": {
"platform": {
"php": "8.1"
"php": "8.0"
},
"allow-plugins": {
"bamarni/composer-bin-plugin": true
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
define('PHPUNIT_RUN', 1);
if (!defined('PHPUNIT_RUN')) {
define('PHPUNIT_RUN', 1);
}

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

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

OC_App::loadApp('notify_push');
\OC_App::loadApp('notify_push');

OC_Hook::clear();
File renamed without changes.
File renamed without changes.
32 changes: 13 additions & 19 deletions tests/phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<!--
- SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
- SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<phpunit bootstrap="bootstrap.php"
timeoutForSmallTests="900"
timeoutForMediumTests="900"
timeoutForLargeTests="900"
convertDeprecationsToExceptions="true"
>
<testsuite name='Nextcloud - Notify Push App Tests'>
<directory suffix='.php'>.</directory>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="bootstrap.php"
verbose="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd">
<testsuite name="unit">
<directory suffix="Test.php">./</directory>
</testsuite>
<filter>
<whitelist>
<directory suffix=".php">../</directory>
<exclude>
<directory suffix=".php">../tests
</directory>
</exclude>
</whitelist>
</filter>
<coverage>
<include>
<directory suffix=".php">./tests/lib</directory>
</include>
</coverage>
</phpunit>
18 changes: 9 additions & 9 deletions vendor-bin/phpunit/composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"config": {
"platform": {
"php": "8.1"
},
"sort-packages": true
},
"require-dev": {
"christophwurst/nextcloud_testing": "^1.0.0"
}
"config": {
"platform": {
"php": "8.0"
},
"sort-packages": true
},
"require-dev": {
"phpunit/phpunit": "^9.6.13"
}
}
Loading

0 comments on commit 65e8c45

Please sign in to comment.