/** * @Then the first product on the list should have :field :value */ public function theFirstProductOnTheListShouldHave($field, $value) { $actualValue = $this->indexPage->getColumnFields($field)[0]; Assert::same($actualValue, $value, sprintf('Expected first product\'s %s to be "%s", but it is "%s".', $field, $value, $actualValue)); }