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 b3fbc98 commit fb33134
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
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>

0 comments on commit fb33134

Please sign in to comment.