Skip to content

Commit

Permalink
Merge pull request #363 from owncloud/moveUnitTestsForNotifications
Browse files Browse the repository at this point in the history
[tests-only][full-ci]Move unit tests to tests/unit and tidy up phpunit xml file
  • Loading branch information
phil-davis authored May 27, 2022
2 parents c1b762f + 0eccbda commit 5b66d09
Show file tree
Hide file tree
Showing 17 changed files with 16 additions and 10 deletions.
16 changes: 6 additions & 10 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit bootstrap="../../tests/bootstrap.php"
<phpunit bootstrap="tests/unit/bootstrap.php"
beStrictAboutOutputDuringTests="true"
verbose="true"
failOnRisky="true"
Expand All @@ -9,6 +9,11 @@
timeoutForLargeTests="900"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">./tests/unit</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">lib</directory>
Expand All @@ -18,13 +23,4 @@
<clover outputFile="tests/output/clover.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<!-- filters for code coverage -->
<logging>
<!-- and this is where your report will be written -->
</logging>
</phpunit>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions tests/unit/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
if (!\defined('PHPUNIT_RUN')) {
\define('PHPUNIT_RUN', 1);
}

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

\OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true);
// load notification unit test classes
\OC::$composerAutoloader->addPsr4('OCA\\Notifications\\Tests\\Unit\\', __DIR__, true);

0 comments on commit 5b66d09

Please sign in to comment.