|
14 | 14 | namespace ApiPlatform\Core\Tests\Bridge\Symfony\Bundle\Test\Constraint; |
15 | 15 |
|
16 | 16 | use ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Constraint\ArraySubset; |
17 | | -use ArrayAccessible; |
18 | | -use ArrayObject; |
19 | | -use Countable; |
| 17 | +use ApiPlatform\Core\Tests\Fixtures\ArrayAccessible; |
20 | 18 | use PHPUnit\Framework\ExpectationFailedException; |
21 | 19 | use PHPUnit\Framework\SelfDescribing; |
22 | 20 | use PHPUnit\Framework\TestCase; |
23 | 21 | use PHPUnit\Runner\Version; |
24 | | -use ReflectionClass; |
25 | 22 | use SebastianBergmann\RecursionContext\InvalidArgumentException; |
26 | | -use Traversable; |
27 | | -use function sprintf; |
28 | 23 |
|
29 | 24 | /** |
30 | 25 | * Imported from dms/phpunit-arraysubset-asserts, because the original constraint has been deprecated. |
@@ -64,22 +59,22 @@ public static function evaluateDataProvider(): array |
64 | 59 | 'loose array subset and ArrayObject other' => [ |
65 | 60 | 'expected' => true, |
66 | 61 | 'subset' => ['bar' => 0], |
67 | | - 'other' => new ArrayObject(['foo' => '', 'bar' => '0']), |
| 62 | + 'other' => new \ArrayObject(['foo' => '', 'bar' => '0']), |
68 | 63 | 'strict' => false, |
69 | 64 | ], |
70 | 65 | 'strict ArrayObject subset and array other' => [ |
71 | 66 | 'expected' => true, |
72 | | - 'subset' => new ArrayObject(['bar' => 0]), |
| 67 | + 'subset' => new \ArrayObject(['bar' => 0]), |
73 | 68 | 'other' => ['foo' => '', 'bar' => 0], |
74 | 69 | 'strict' => true, |
75 | 70 | ], |
76 | 71 | ]; |
77 | 72 | } |
78 | 73 |
|
79 | 74 | /** |
80 | | - * @param array|Traversable|mixed[] $subset |
81 | | - * @param array|Traversable|mixed[] $other |
82 | | - * @param bool $strict |
| 75 | + * @param array|\Traversable|mixed[] $subset |
| 76 | + * @param array|\Traversable|mixed[] $other |
| 77 | + * @param bool $strict |
83 | 78 | * |
84 | 79 | * @throws ExpectationFailedException |
85 | 80 | * @throws InvalidArgumentException |
@@ -118,20 +113,20 @@ public function testEvaluateFailMessage(): void |
118 | 113 |
|
119 | 114 | public function testIsCountable(): void |
120 | 115 | { |
121 | | - $reflection = new ReflectionClass(ArraySubset::class); |
| 116 | + $reflection = new \ReflectionClass(ArraySubset::class); |
122 | 117 |
|
123 | 118 | $this->assertTrue( |
124 | | - $reflection->implementsInterface(Countable::class), |
| 119 | + $reflection->implementsInterface(\Countable::class), |
125 | 120 | sprintf( |
126 | 121 | 'Failed to assert that ArraySubset implements "%s".', |
127 | | - Countable::class |
| 122 | + \Countable::class |
128 | 123 | ) |
129 | 124 | ); |
130 | 125 | } |
131 | 126 |
|
132 | 127 | public function testIsSelfDescribing(): void |
133 | 128 | { |
134 | | - $reflection = new ReflectionClass(ArraySubset::class); |
| 129 | + $reflection = new \ReflectionClass(ArraySubset::class); |
135 | 130 |
|
136 | 131 | $this->assertTrue( |
137 | 132 | $reflection->implementsInterface(SelfDescribing::class), |
|
0 commit comments