Sylius\Behat\Page\Shop\Product\ShowPageInterface::getAttributeByName PHP Method

getAttributeByName() public method

public getAttributeByName ( string $attributeName ) : string
$attributeName string
return string
    public function getAttributeByName($attributeName);

Usage Example

Example #1
0
 /**
  * @Then I should see the product attribute :attributeName with value :expectedAttribute
  */
 public function iShouldSeeTheProductAttributeWithValue($attributeName, $expectedAttribute)
 {
     $certainAttribute = $this->showPage->getAttributeByName($attributeName);
     Assert::same($certainAttribute, $expectedAttribute, sprintf('Product should have attribute %s with value %s, but has %s.', $attributeName, $expectedAttribute, $certainAttribute));
 }