/**
  * Test for method getAttributeOptions()
  */
 public function testGetAttributeOptions()
 {
     $indexAttributeCode = 'gender';
     /** @var $attributeCollection \Magento\Customer\Model\Resource\Attribute\Collection */
     $attributeCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Customer\\Model\\Resource\\Attribute\\Collection');
     $attributeCollection->addFieldToFilter('attribute_code', ['in' => [$indexAttributeCode, 'group_id']]);
     /** @var $attribute \Magento\Customer\Model\Attribute */
     foreach ($attributeCollection as $attribute) {
         $index = $attribute->getAttributeCode() == $indexAttributeCode ? 'value' : 'label';
         $expectedOptions = [];
         foreach ($attribute->getSource()->getAllOptions(false) as $option) {
             $expectedOptions[strtolower($option[$index])] = $option['value'];
         }
         $actualOptions = $this->_model->getAttributeOptions($attribute, [$indexAttributeCode]);
         sort($expectedOptions);
         sort($actualOptions);
         $this->assertEquals($expectedOptions, $actualOptions);
     }
 }