Ejemplo n.º 1
0
 public function testGetCustomAttributesMetadata()
 {
     $customAttributesMetadata = $this->_service->getCustomAttributesMetadata();
     $this->assertCount(2, $customAttributesMetadata, "Invalid number of attributes returned.");
     $configAttributeCode = 'address_attribute_1';
     $configAttributeFound = false;
     foreach ($customAttributesMetadata as $attribute) {
         if ($attribute->getAttributeCode() == $configAttributeCode) {
             $configAttributeFound = true;
             break;
         }
     }
     if (!$configAttributeFound) {
         $this->fail("Custom attribute declared in the config not found.");
     }
 }