Skip to content

Commit 323c32c

Browse files
committed
B2B-2606: Graphql Parser called at least 3 times per request
1 parent c987618 commit 323c32c

File tree

1 file changed

+3
-6
lines changed
  • dev/tests/integration/testsuite/Magento/GraphQl/Controller/HttpRequestValidator/HttpRequestValidator

1 file changed

+3
-6
lines changed

app/code/Magento/GraphQl/Test/Unit/Controller/HttpRequestValidator/HttpVerbValidatorTest.php renamed to dev/tests/integration/testsuite/Magento/GraphQl/Controller/HttpRequestValidator/HttpRequestValidator/HttpVerbValidatorTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
*/
66
declare(strict_types=1);
77

8-
namespace Magento\GraphQl\Test\Unit\Controller\HttpRequestValidator;
8+
namespace Magento\GraphQl\Controller\HttpRequestValidator\HttpRequestValidator;
99

1010
use Magento\Framework\App\HttpRequestInterface;
11-
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1211
use Magento\GraphQl\Controller\HttpRequestValidator\HttpVerbValidator;
1312
use PHPUnit\Framework\MockObject\MockObject;
1413
use PHPUnit\Framework\TestCase;
@@ -33,7 +32,7 @@ class HttpVerbValidatorTest extends TestCase
3332
*/
3433
protected function setup(): void
3534
{
36-
$objectManager = new ObjectManager($this);
35+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
3736
$this->requestMock = $this->getMockBuilder(HttpRequestInterface::class)
3837
->disableOriginalConstructor()
3938
->onlyMethods(
@@ -47,9 +46,7 @@ protected function setup(): void
4746
)
4847
->getMockForAbstractClass();
4948

50-
$this->httpVerbValidator = $objectManager->getObject(
51-
HttpVerbValidator::class
52-
);
49+
$this->httpVerbValidator = $objectManager->get(HttpVerbValidator::class);
5350
}
5451

5552
/**

0 commit comments

Comments
 (0)