File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace MongoDB \Tests \Compat ;
4
+
5
+ use PHPUnit \Framework \Assert ;
6
+ use ReflectionClass ;
7
+ use Symfony \Bridge \PhpUnit \Legacy \PolyfillAssertTrait as SymfonyPolyfillAssertTrait ;
8
+
9
+ $ r = new ReflectionClass (Assert::class);
10
+ if (! $ r ->hasMethod ('assertEqualsWithDelta ' )) {
11
+ /**
12
+ * @internal
13
+ */
14
+ trait PolyfillAssertTrait
15
+ {
16
+ use SymfonyPolyfillAssertTrait;
17
+ }
18
+ } else {
19
+ /**
20
+ * @internal
21
+ */
22
+ trait PolyfillAssertTrait
23
+ {
24
+ }
25
+ }
Original file line number Diff line number Diff line change 7
7
use MongoDB \Driver \WriteConcern ;
8
8
use MongoDB \Model \BSONArray ;
9
9
use MongoDB \Model \BSONDocument ;
10
+ use MongoDB \Tests \Compat \PolyfillAssertTrait ;
10
11
use PHPUnit \Framework \TestCase as BaseTestCase ;
11
12
use InvalidArgumentException ;
12
13
use ReflectionClass ;
15
16
16
17
abstract class TestCase extends BaseTestCase
17
18
{
19
+ use PolyfillAssertTrait;
20
+
18
21
/**
19
22
* Return the connection URI.
20
23
*
You can’t perform that action at this time.
0 commit comments