Skip to content

Commit

Permalink
GraphQl-387: Test coverage of getting IDs of CMS page/blocks by Graph…
Browse files Browse the repository at this point in the history
…QL API
  • Loading branch information
naydav committed May 8, 2019
1 parent 478f438 commit 787d31b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ public function getDataByPageIdentifier(string $pageIdentifier): array
}

/**
* Convert page data
*
* @param PageInterface $page
* @return array
* @throws NoSuchEntityException
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/CmsGraphQl/Model/Resolver/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function resolve(
array $value = null,
array $args = null
) {
if (!isset($args['id'], $args['identifier'])) {
if (!isset($args['id']) && !isset($args['identifier'])) {
throw new GraphQlInputException(__('"Page id/identifier should be specified'));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
use Magento\TestFramework\TestCase\GraphQlAbstract;
use Magento\Widget\Model\Template\FilterEmulate;

/**
* Get CMS Block test
*/
class CmsBlockTest extends GraphQlAbstract
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Magento\TestFramework\ObjectManager;
use Magento\TestFramework\TestCase\GraphQlAbstract;

/**
* Get CMS Page test
*/
class CmsPageTest extends GraphQlAbstract
{
/**
Expand Down

0 comments on commit 787d31b

Please sign in to comment.