Skip to content

Commit 7d515fd

Browse files
committed
assert both results
1 parent 40c000b commit 7d515fd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/Executor/ValidationWithCacheTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ public function testIsValidationCachedWithAdapter(): void
7979
}';
8080

8181
// make the same call twice in a row. We'll then inspect the cache object to count calls
82-
GraphQL::executeQuery( $schema, $query, null, null, null, null, null, null, $cache)->toArray();
83-
$result = GraphQL::executeQuery( $schema, $query, null, null, null, null, null, null, $cache)->toArray();
82+
$resultA = GraphQL::executeQuery( $schema, $query, null, null, null, null, null, null, $cache)->toArray();
83+
$resultB = GraphQL::executeQuery( $schema, $query, null, null, null, null, null, null, $cache)->toArray();
84+
8485

8586
// ✅ Assert that validation only happened once
8687
self::assertEquals(2, $cache->isValidatedCalls, 'Should check cache twice');
@@ -95,6 +96,7 @@ public function testIsValidationCachedWithAdapter(): void
9596
],
9697
];
9798

98-
self::assertEquals($expected, $result);
99+
self::assertEquals($expected, $resultA);
100+
self::assertEquals($expected, $resultB);
99101
}
100102
}

0 commit comments

Comments
 (0)