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

Fixed return value for getGraphQlClient in API-functional tests #127

Merged
merged 4 commits into from
Aug 16, 2018

Conversation

rogyar
Copy link
Contributor

@rogyar rogyar commented Jul 20, 2018

Description

\Magento\TestFramework\TestCase\GraphQlAbstract::getGraphQlClient is supposed to return \Magento\TestFramework\TestCase\GraphQl\Client. However, if graphQlClient was initialized previously, the method returns nothing.
The fix adjusts the return behavior. So getGraphQlClient always returns correct value.

Fixed Issues (if relevant)

N/A

Manual testing scenarios

N/A

}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like logic should be

if ($this->graphQlClient === null) {
             $this->graphQlClient = Bootstrap::getObjectManager()->get(\Magento\TestFramework\TestCase\GraphQl\Client::class);
}
return $this->graphQlClient;

@rogyar
Copy link
Contributor Author

rogyar commented Jul 24, 2018

Hi @naydav. Thank you for your review. I've added the mentioned changes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants