Skip to content

Commit 5bb6f8d

Browse files
committed
magento#913 - Fixed test fixture, added the male customer for testing the gender upgrade.
1 parent 939ec72 commit 5bb6f8d

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/GetCustomerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function setUp()
4444
*/
4545
public function testGetCustomer()
4646
{
47-
$currentEmail = 'customer@example.com';
47+
$currentEmail = 'customer_male@example.com';
4848
$currentPassword = 'password';
4949
$customerGender = 'MALE';
5050

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function setUp()
4747
*/
4848
public function testUpdateCustomer()
4949
{
50-
$currentEmail = 'customer@example.com';
50+
$currentEmail = 'customer_male@example.com';
5151
$currentPassword = 'password';
5252

5353
$newPrefix = 'Dr';

dev/tests/integration/testsuite/Magento/Customer/_files/customer.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,32 @@
2727
->setDefaultBilling(1)
2828
->setDefaultShipping(1)
2929
->setTaxvat('12')
30+
->setGender(0);
31+
32+
$customer->isObjectNew(true);
33+
$customer->save();
34+
$customerRegistry->remove($customer->getId());
35+
36+
$customer = $objectManager->create(\Magento\Customer\Model\Customer::class);
37+
/** @var Magento\Customer\Model\Customer $customer */
38+
$customer->setWebsiteId(1)
39+
->setId(2)
40+
->setEmail('customer_male@example.com')
41+
->setPassword('password')
42+
->setGroupId(1)
43+
->setStoreId(1)
44+
->setIsActive(1)
45+
->setPrefix('Mr.')
46+
->setFirstname('Veronica')
47+
->setMiddlename('A')
48+
->setLastname('Costello')
49+
->setSuffix('Esq.')
50+
->setDefaultBilling(1)
51+
->setDefaultShipping(1)
52+
->setTaxvat('12')
3053
->setGender(1);
3154

3255
$customer->isObjectNew(true);
3356
$customer->save();
3457
$customerRegistry->remove($customer->getId());
58+

0 commit comments

Comments
 (0)