Skip to content

Commit

Permalink
Change order of customer gender values
Browse files Browse the repository at this point in the history
  • Loading branch information
chadbean committed Jul 30, 2015
1 parent 72d8851 commit afeb170
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ public function testGetCustomer()
*/
public function testGetGenderOptions()
{
$options = [['label' => __('Not Specified'), 'value' => 'NA'], ['label' => __('Male'), 'value' => 'M'], ['label' => __('Female'), 'value' => 'F']];
$options = [
['label' => __('Male'), 'value' => 'M'],
['label' => __('Female'), 'value' => 'F'],
['label' => __('Not Specified'), 'value' => 'NA']
];

$this->attribute->expects($this->once())->method('getOptions')->will($this->returnValue($options));
$this->assertSame($options, $this->block->getGenderOptions());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ public function getAttributeMetadataDataProvider()
AttributeMetadata::DATA_MODEL => '',
AttributeMetadata::OPTIONS => [
['label' => '', 'value' => ''],
['label' => 'Not Specified', 'value' => '1'],
['label' => 'Male', 'value' => '2'],
['label' => 'Female', 'value' => '3']
['label' => 'Male', 'value' => '1'],
['label' => 'Female', 'value' => '2'],
['label' => 'Not Specified', 'value' => '3']
],
AttributeMetadata::FRONTEND_CLASS => '',
AttributeMetadata::FRONTEND_LABEL => 'Gender',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class Curl extends AbstractCurl implements CustomerInterface
'United Kingdom' => 'GB'
],
'gender' => [
'Not Specified' => 1,
'Male' => 2,
'Female' => 3
'Male' => 1,
'Female' => 2,
'Not Specified' => 3
],
'region_id' => [
'California' => 12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public function testToHtml()
{
$html = $this->_block->toHtml();
$this->assertContains('<span>Gender</span>', $html);
$this->assertContains('<option value="1">Not Specified</option>', $html);
$this->assertContains('<option value="2">Male</option>', $html);
$this->assertContains('<option value="3">Female</option>', $html);
$this->assertContains('<option value="1">Male</option>', $html);
$this->assertContains('<option value="2">Female</option>', $html);
$this->assertContains('<option value="3">Not Specified</option>', $html);
}
}

0 comments on commit afeb170

Please sign in to comment.