Skip to content

Commit eb7cfac

Browse files
author
Roman Skoropadsky
committed
fix: hack for class not found in test
1 parent 6986321 commit eb7cfac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/GraphQl/Tests/State/Provider/ReadProviderTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@ public function testProvide(): void
3939

4040
/**
4141
* Tests that provider returns null if resource is not found.
42+
*
4243
* @see https://github.com/api-platform/core/issues/6072
4344
*/
4445
public function testProvideNotExistedResource(): void
4546
{
47+
if (!class_exists('\ApiPlatform\Exception\ItemNotFoundException')) {
48+
class_alias('\ApiPlatform\Metadata\Exception\ItemNotFoundException', '\ApiPlatform\Exception\ItemNotFoundException');
49+
}
50+
4651
$context = ['args' => ['id' => '/dummy/1']];
4752
$operation = new Query(class: 'dummy');
4853
$decorated = $this->createMock(ProviderInterface::class);

0 commit comments

Comments
 (0)