Skip to content

Commit 779d3cb

Browse files
committed
Test case updated
1 parent b1f1921 commit 779d3cb

File tree

1 file changed

+7
-29
lines changed

1 file changed

+7
-29
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/IntrospectionQueryTest.php

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<?php
22
/**
3-
* Copyright 2025 Adobe
4-
* All Rights Reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
55
*/
66
declare(strict_types=1);
77

88
namespace Magento\GraphQl;
99

10-
use Magento\Framework\App\ObjectManager;
1110
use Magento\TestFramework\TestCase\GraphQlAbstract;
12-
use Psr\Log\LoggerInterface;
1311

1412
class IntrospectionQueryTest extends GraphQlAbstract
1513
{
@@ -55,11 +53,7 @@ public function testIntrospectionQuery()
5553
defaultValue
5654
}
5755
QUERY;
58-
try {
59-
$this->assertArrayHasKey('__schema', $this->graphQlQuery($query));
60-
} catch (\Exception $e){
61-
ObjectManager::getInstance()->get(LoggerInterface::class)->debug($e->getMessage());
62-
}
56+
$this->assertArrayHasKey('__schema', $this->graphQlQuery($query));
6357
}
6458

6559
/**
@@ -104,11 +98,7 @@ public function testIntrospectionQueryWithOnlySchema()
10498
defaultValue
10599
}
106100
QUERY;
107-
try {
108-
$this->assertArrayHasKey('__schema', $this->graphQlQuery($query));
109-
} catch (\Exception $e){
110-
ObjectManager::getInstance()->get(LoggerInterface::class)->debug($e->getMessage());
111-
}
101+
$this->assertArrayHasKey('__schema', $this->graphQlQuery($query));
112102
$response = $this->graphQlQuery($query);
113103

114104
$query
@@ -147,11 +137,7 @@ public function testIntrospectionQueryWithOnlySchema()
147137
defaultValue
148138
}
149139
QUERY;
150-
try {
151-
$this->assertArrayHasKey('__schema', $this->graphQlQuery($query));
152-
} catch (\Exception $e){
153-
ObjectManager::getInstance()->get(LoggerInterface::class)->debug($e->getMessage());
154-
}
140+
$this->assertArrayHasKey('__schema', $this->graphQlQuery($query));
155141
$responseFields = $this->graphQlQuery($query);
156142
$this->assertResponseFields($response, $responseFields);
157143
$this->assertEquals($responseFields, $response);
@@ -183,11 +169,7 @@ public function testIntrospectionQueryWithOnlyType()
183169
}
184170
}
185171
QUERY;
186-
try {
187-
$this->assertArrayHasKey('__type', $this->graphQlQuery($query));
188-
} catch (\Exception $e){
189-
ObjectManager::getInstance()->get(LoggerInterface::class)->debug($e->getMessage());
190-
}
172+
$this->assertArrayHasKey('__type', $this->graphQlQuery($query));
191173
$response = $this->graphQlQuery($query);
192174
$this->assertNotEmpty($response['__type']['fields']);
193175
}
@@ -227,11 +209,7 @@ enumValues(includeDeprecated: true) {
227209
}
228210
229211
QUERY;
230-
try {
231-
$response = $this->graphQlQuery($query);
232-
} catch (\Exception $e){
233-
ObjectManager::getInstance()->get(LoggerInterface::class)->debug($e->getMessage());
234-
}
212+
$response = $this->graphQlQuery($query);
235213
$this->assertArrayHasKey('__schema', $response);
236214
$schemaResponseFields = $response['__schema']['types'];
237215
$enumValueReasonArray = $this->getEnumValueDeprecatedReason($schemaResponseFields);

0 commit comments

Comments
 (0)