Skip to content

Commit 4b5dc48

Browse files
author
Michael Logvin
committed
Merge branch 'MAGETWO-28011' of github.corp.ebay.com:magento-firedrakes/magento2ce into MAGETWO-28011
2 parents be139f2 + 38fc6a1 commit 4b5dc48

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

app/code/Magento/Customer/Api/Data/CustomerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,15 @@ public function setSuffix($suffix);
277277
* Get gender
278278
*
279279
* @api
280-
* @return string|null
280+
* @return int|null
281281
*/
282282
public function getGender();
283283

284284
/**
285285
* Set gender
286286
*
287287
* @api
288-
* @param string $gender
288+
* @param int $gender
289289
* @return $this
290290
*/
291291
public function setGender($gender);

dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/AccountTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ public function testToHtml()
9393
$this->assertNotContains('field-confirmation', $result);
9494
$this->assertNotContains('_accountconfirmation', $result);
9595

96-
// Prefix is present but empty
97-
$this->assertRegExp('/<input id="_accountprefix"[^>]*value=""/', $result);
96+
// Prefix is present and not empty
97+
$this->assertRegExp('/<input id="_accountprefix"[^>]*value="Mr."/', $result);
9898

9999
// Does not contain send email controls
100100
$this->assertNotContains('<input id="_accountsendemail"', $result);

dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Edit/Tab/View/PersonalInfoTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ public function tearDown()
9595
*/
9696
public function testGetCustomer()
9797
{
98-
$expectedCustomer = $this->_loadCustomer();
99-
$actualCustomer = $this->_block->getCustomer();
100-
foreach ($expectedCustomer->__toArray() as $property => $value) {
98+
$expectedCustomerData = $this->_loadCustomer()->__toArray();
99+
$actualCustomerData = $this->_block->getCustomer()->__toArray();
100+
foreach ($expectedCustomerData as $property => $value) {
101101
$expectedValue = is_numeric($value) ? intval($value) : $value;
102-
$actualValue = $actualCustomer->__toArray()[$property];
102+
$actualValue = isset($actualCustomerData[$property]) ? $actualCustomerData[$property] : null;
103103
$actualValue = is_numeric($actualValue) ? intval($actualValue) : $actualValue;
104104
$this->assertEquals($expectedValue, $actualValue);
105105
}

dev/tests/integration/testsuite/Magento/Customer/Model/CustomerMetadataTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,17 @@ public function testGetCustomerAttributeMetadata()
101101
'website_id' => 1,
102102
'store_id' => 1,
103103
'group_id' => 1,
104+
'prefix' => 'Mr.',
104105
'firstname' => 'John',
106+
'middlename' => 'A',
105107
'lastname' => 'Smith',
108+
'suffix' => 'Esq.',
106109
'email' => 'customer@example.com',
107110
'default_billing' => '1',
108111
'default_shipping' => '1',
109112
'disable_auto_group_change' => 0,
113+
'taxvat' => '12',
114+
'gender' => 0
110115
];
111116

112117
$customer = $this->customerRepository->getById(1);

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,14 @@
1717
->setGroupId(1)
1818
->setStoreId(1)
1919
->setIsActive(1)
20-
->setCreatedIn('Store Name')
2120
->setPrefix('Mr.')
2221
->setFirstname('John')
2322
->setMiddlename('A')
2423
->setLastname('Smith')
2524
->setSuffix('Esq.')
26-
->setDob('1970-01-01')
2725
->setDefaultBilling(1)
2826
->setDefaultShipping(1)
2927
->setTaxvat('12')
30-
->setConfirmation('a4fg7h893e39d')
3128
->setGender(0);
3229
$customer->isObjectNew(true);
3330
$customer->save();

0 commit comments

Comments
 (0)