/**
  * Test the Gender::toHtml() method.
  * @return void
  */
 public function testToHtml()
 {
     $html = $this->_block->toHtml();
     $this->assertContains('<span>Gender</span>', $html);
     $this->assertContains('<option value="1">Male</option>', $html);
     $this->assertContains('<option value="2">Female</option>', $html);
 }
Exemple #2
0
 /**
  * Test the Gender::getGenderOptions() method.
  * @return void
  */
 public function testGetGenderOptions()
 {
     $options = [['label' => __('Male'), 'value' => 'M'], ['label' => __('Female'), 'value' => 'F']];
     $this->_attribute->expects($this->once())->method('getOptions')->will($this->returnValue($options));
     $this->assertSame($options, $this->_block->getGenderOptions());
 }