6 declare(strict_types=1);
20 $productSku =
'simple';
24 products(filter: {sku: {eq:
"{$productSku}"}})
35 $this->assertArrayHasKey(0,
$response[
'products'][
'items']);
36 $this->assertArrayHasKey(
'only_x_left_in_stock',
$response[
'products'][
'items'][0]);
37 $this->assertNull(
$response[
'products'][
'items'][0][
'only_x_left_in_stock']);
46 $this->markTestIncomplete(
'https://github.com/magento/graphql-ce/issues/167');
47 $productSku =
'simple';
51 products(filter: {sku: {eq:
"{$productSku}"}})
61 $this->assertArrayHasKey(0,
$response[
'products'][
'items']);
62 $this->assertArrayHasKey(
'only_x_left_in_stock',
$response[
'products'][
'items'][0]);
63 $this->assertEquals(100,
$response[
'products'][
'items'][0][
'only_x_left_in_stock']);
testQueryProductOnlyXLeftInStockEnabled()
testQueryProductOnlyXLeftInStockDisabled()
graphQlQuery(string $query, array $variables=[], string $operationName='', array $headers=[])