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 77use MongoDB \Driver \WriteConcern ;
88use MongoDB \Model \BSONArray ;
99use MongoDB \Model \BSONDocument ;
10+ use MongoDB \Tests \Compat \PolyfillAssertTrait ;
1011use PHPUnit \Framework \TestCase as BaseTestCase ;
1112use InvalidArgumentException ;
1213use ReflectionClass ;
1516
1617abstract class TestCase extends BaseTestCase
1718{
19+ use PolyfillAssertTrait;
20+
1821 /**
1922 * Return the connection URI.
2023 *
You can’t perform that action at this time.
0 commit comments