Skip to content

Commit 35cc913

Browse files
committed
Include PHPUnit functions via autoload-dev
1 parent 9d50bd5 commit 35cc913

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
"files": [ "src/functions.php" ]
2727
},
2828
"autoload-dev": {
29-
"psr-4": { "MongoDB\\Tests\\": "tests/" }
29+
"psr-4": { "MongoDB\\Tests\\": "tests/" },
30+
"// Manually include assertion functions for PHPUnit 8.x and earlier ":"",
31+
"// See: https://github.com/sebastianbergmann/phpunit/issues/3746 ":"",
32+
"files": [ "vendor/phpunit/phpunit/src/Framework/Assert/Functions.php" ]
3033
},
3134
"extra": {
3235
"branch-alias": {

tests/bootstrap.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
throw new Exception('Can\'t find autoload.php. Did you install dependencies with Composer?');
1111
}
1212

13-
/* Manually include assertion functions for PHPUnit 8.x and earlier.
14-
* See: https://github.com/sebastianbergmann/phpunit/issues/3746 */
15-
require_once(__DIR__ . '/../vendor/phpunit/phpunit/src/Framework/Assert/Functions.php');
16-
1713
if (! class_exists(PHPUnit\Framework\Error\Warning::class)) {
1814
class_alias(PHPUnit_Framework_Error_Warning::class, PHPUnit\Framework\Error\Warning::class);
1915
}

0 commit comments

Comments
 (0)