Skip to content

Commit

Permalink
Merge branch '5.2' into 5
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 11, 2024
2 parents d6f8d60 + 4a67d04 commit 732929a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/Schema/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
use GraphQL\Validator\Rules\QueryComplexity;
use GraphQL\Validator\Rules\QueryDepth;
use GraphQL\Validator\ValidationContext;
use ReflectionProperty;
use ReflectionClass;

class IntegrationTest extends SapphireTest
{
Expand Down Expand Up @@ -1688,11 +1688,10 @@ public function testGlobalRuleNotRemoved()

private function removeDocumentValidatorRule(string $ruleName): void
{
$reflectionRules = new ReflectionProperty(DocumentValidator::class, 'rules');
$reflectionRules->setAccessible(true);
$rules = $reflectionRules->getValue();
$reflectionRules = new ReflectionClass(DocumentValidator::class);
$rules = $reflectionRules->getStaticPropertyValue('rules');
unset($rules[$ruleName]);
$reflectionRules->setValue($rules);
$reflectionRules->setStaticPropertyValue('rules', $rules);
}

private function createProviderForComplexityOrDepth(int $limit): array
Expand Down

0 comments on commit 732929a

Please sign in to comment.