Skip to content

Commit

Permalink
Merge pull request #680 from jeherve/update/tests-autoload
Browse files Browse the repository at this point in the history
Tests: stop autoloading with the rest of the production build
  • Loading branch information
NielsLeenheer authored Apr 16, 2024
2 parents 377249e + 77a681d commit d8c8f9e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

"autoload": {
"psr-4": {
"WhichBrowser\\": [ "src/", "tests/src/" ]
"WhichBrowser\\": [ "src/" ]
}
},

Expand All @@ -40,7 +40,8 @@

"autoload-dev": {
"psr-4": {
"WhichBrowserTest\\": "tests/unit"
"WhichBrowserTest\\": "tests/unit",
"WhichBrowser\\": [ "tests/src/" ]
},

"files": [ "tests/src/polyfills.php" ]
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<phpunit
bootstrap="./vendor/autoload.php"
bootstrap="tests/src/bootstrap.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
Expand Down
11 changes: 11 additions & 0 deletions tests/src/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Bootstrap tests.
*
* @package WhichBrowser/Parser-PHP
*/

/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';

0 comments on commit d8c8f9e

Please sign in to comment.