/** * @Then /^I should(?:| also) see the product association "([^"]+)" with (products "[^"]+" and "[^"]+")$/ */ public function iShouldSeeTheProductAssociationWithProducts($productAssociationName, array $products) { Assert::true($this->showPage->hasAssociation($productAssociationName), sprintf('There should be an association named "%s" but it does not.', $productAssociationName)); foreach ($products as $product) { $this->assertIsProductIsInAssociation($product->getName(), $productAssociationName); } }