Skip to content

Commit d8c8f9e

Browse files
Merge pull request #680 from jeherve/update/tests-autoload
Tests: stop autoloading with the rest of the production build
2 parents 377249e + 77a681d commit d8c8f9e

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
"autoload": {
2222
"psr-4": {
23-
"WhichBrowser\\": [ "src/", "tests/src/" ]
23+
"WhichBrowser\\": [ "src/" ]
2424
}
2525
},
2626

@@ -40,7 +40,8 @@
4040

4141
"autoload-dev": {
4242
"psr-4": {
43-
"WhichBrowserTest\\": "tests/unit"
43+
"WhichBrowserTest\\": "tests/unit",
44+
"WhichBrowser\\": [ "tests/src/" ]
4445
},
4546

4647
"files": [ "tests/src/polyfills.php" ]

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<phpunit
2-
bootstrap="./vendor/autoload.php"
2+
bootstrap="tests/src/bootstrap.php"
33
colors="false"
44
convertErrorsToExceptions="true"
55
convertNoticesToExceptions="true"

tests/src/bootstrap.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
/**
3+
* Bootstrap tests.
4+
*
5+
* @package WhichBrowser/Parser-PHP
6+
*/
7+
8+
/**
9+
* Include the composer autoloader.
10+
*/
11+
require_once __DIR__ . '/../../vendor/autoload.php';

0 commit comments

Comments
 (0)