diff --git a/.gitignore b/.gitignore
index 7a68906b8d675e2eede3f6536f35e120ef4d6323..27d8c3590c6455b8b549f83551d9a7187b70b37b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
/vendor
/composer.lock
+/phpunit.xml
/public
/docs
diff --git a/composer.json b/composer.json
index 3501dcf769caa37f1e2a30874c57d4a1bca274d4..99c6c7c69cf04c5b0c8663001760bfd4ce70a615 100644
--- a/composer.json
+++ b/composer.json
@@ -19,12 +19,13 @@
}
],
"minimum-stability": "dev",
+ "prefer-stable": true,
"require": {
"php": ">=7.2",
"guzzlehttp/guzzle": "^6.0|^7.0"
},
"require-dev": {
- "phpunit/phpunit": "8.5.x-dev"
+ "phpunit/phpunit": "^9.3"
},
"support": {
"source": "https://gitlab.res-telae.cat/restelae/php-gbif"
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 0000000000000000000000000000000000000000..4237d861c1bfda57d30f024568b3cea90e1bb307
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
+ bootstrap="vendor/autoload.php"
+ executionOrder="depends,defects"
+ forceCoversAnnotation="true"
+ beStrictAboutCoversAnnotation="false"
+ beStrictAboutOutputDuringTests="true"
+ beStrictAboutTodoAnnotatedTests="true"
+ convertDeprecationsToExceptions="true"
+ colors="true"
+ verbose="true"
+>
+ <php>
+ <ini name="display_errors" value="1" />
+ <ini name="error_reporting" value="-1" />
+ </php>
+
+ <testsuites>
+ <testsuite name="PHP-GBIF Test Suite">
+ <directory>tests/Unit</directory>
+ </testsuite>
+ </testsuites>
+
+ <coverage processUncoveredFiles="true">
+ <include>
+ <directory suffix=".php">src</directory>
+ </include>
+ </coverage>
+</phpunit>
diff --git a/tests/Unit/OccurrencesTest.php b/tests/Unit/OccurrencesTest.php
index 7b85ba5618c1f2f7bc5af6917a19952516b5bd7f..18c0b8ca8bac1068528c6804737bd01def2ad1d4 100644
--- a/tests/Unit/OccurrencesTest.php
+++ b/tests/Unit/OccurrencesTest.php
@@ -4,8 +4,11 @@ namespace ResTelae\Gbif\Tests\Unit;
use PHPUnit\Framework\TestCase;
use ResTelae\Gbif\Occurrences;
-use ResTelae\Gbif\Species;
+/**
+ * @covers \ResTelae\Gbif\Occurrences
+ * @internal
+ */
final class OccurrencesTest extends TestCase
{
/** @var Occurrences */
diff --git a/tests/Unit/SpeciesTest.php b/tests/Unit/SpeciesTest.php
index 676957677a82bc02655613a8f70a545b1ac31c65..70b13b026e2ad45107d38c90d797ef29cbeed529 100644
--- a/tests/Unit/SpeciesTest.php
+++ b/tests/Unit/SpeciesTest.php
@@ -5,6 +5,10 @@ namespace ResTelae\Gbif\Tests\Unit;
use PHPUnit\Framework\TestCase;
use ResTelae\Gbif\Species;
+/**
+ * @covers \ResTelae\Gbif\Species
+ * @internal
+ */
final class SpeciesTest extends TestCase
{
/** @var Species */