Skip to content

Commit 0533dc2

Browse files
committed
GraphQL-248: [My Account] Create customer account
-- fix static tests
1 parent 9551799 commit 0533dc2

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

app/code/Magento/ConfigurableProductGraphQl/Model/ConfigurableProductTypeResolver.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Magento\ConfigurableProduct\Model\Product\Type\Configurable as Type;
1212

1313
/**
14-
* {@inheritdoc}
14+
* @inheritdoc
1515
*/
1616
class ConfigurableProductTypeResolver implements TypeResolverInterface
1717
{
@@ -21,13 +21,12 @@ class ConfigurableProductTypeResolver implements TypeResolverInterface
2121
const TYPE_RESOLVER = 'ConfigurableProduct';
2222

2323
/**
24-
* {@inheritdoc}
24+
* @inheritdoc
2525
*/
26-
public function resolveType(array $data) : string
26+
public function resolveType(array $data): string
2727
{
2828
if (isset($data['type_id']) && $data['type_id'] == Type::TYPE_CODE) {
2929
return self::TYPE_RESOLVER;
30-
3130
}
3231
return '';
3332
}

app/code/Magento/CustomerGraphQl/Model/Customer/CreateAccount.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ public function __construct(
5959
}
6060

6161
/**
62+
* Creates new customer account
63+
*
6264
* @param array $args
6365
* @return CustomerInterface
6466
* @throws LocalizedException
6567
* @throws NoSuchEntityException
6668
*/
67-
public function execute($args)
69+
public function execute(array $args): CustomerInterface
6870
{
6971
$customerDataObject = $this->customerFactory->create();
7072
$this->dataObjectHelper->populateWithArray(

app/code/Magento/CustomerGraphQl/Model/Customer/SetUpUserContext.php

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
class SetUpUserContext
1818
{
1919
/**
20+
* Set up user context after creating new customer account
21+
*
2022
* @param ContextInterface $context
2123
* @param CustomerInterface $customer
2224
*/

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/GetCartTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public function testGetCartFromAnotherCustomer()
8585
'reserved_order_id'
8686
);
8787

88-
8988
$maskedQuoteId = $this->quoteIdToMaskedId->execute((int)$this->quote->getId());
9089
$query = $this->prepareGetCartQuery($maskedQuoteId);
9190

dev/tests/integration/testsuite/Magento/Checkout/_files/active_quote.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
->create();
1717
$quoteIdMask->setQuoteId($quote->getId());
1818
$quoteIdMask->setDataChanges(true);
19-
$quoteIdMask->save();
19+
$quoteIdMask->save();

0 commit comments

Comments
 (0)