Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
ENGCOM-5933: Add Store Name to Config Schema #952
Browse files Browse the repository at this point in the history
  • Loading branch information
lenaorobei authored Sep 23, 2019
2 parents d17fc9c + 7380be7 commit e2bb877
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/code/Magento/StoreGraphQl/etc/graphql/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@
</argument>
</arguments>
</type>
<type name="Magento\StoreGraphQl\Model\Resolver\Store\StoreConfigDataProvider">
<arguments>
<argument name="extendedConfigData" xsi:type="array">
<item name="store_name" xsi:type="string">store/information/name</item>
</argument>
</arguments>
</type>
</config>
1 change: 1 addition & 0 deletions app/code/Magento/StoreGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ type StoreConfig @doc(description: "The type contains information about a store
secure_base_link_url : String @doc(description: "Secure base link URL for the store")
secure_base_static_url : String @doc(description: "Secure base static URL for the store")
secure_base_media_url : String @doc(description: "Secure base media URL for the store")
store_name : String @doc(description: "Name of the store")
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ protected function setUp()

/**
* @magentoApiDataFixture Magento/Store/_files/store.php
* @magentoConfigFixture default_store store/information/name Test Store
*/
public function testGetStoreConfig()
{
Expand Down Expand Up @@ -62,7 +63,8 @@ public function testGetStoreConfig()
secure_base_url,
secure_base_link_url,
secure_base_static_url,
secure_base_media_url
secure_base_media_url,
store_name
}
}
QUERY;
Expand All @@ -89,5 +91,6 @@ public function testGetStoreConfig()
$response['storeConfig']['secure_base_static_url']
);
$this->assertEquals($storeConfig->getSecureBaseMediaUrl(), $response['storeConfig']['secure_base_media_url']);
$this->assertEquals('Test Store', $response['storeConfig']['store_name']);
}
}

0 comments on commit e2bb877

Please sign in to comment.