/** * @Then the first order should have number :number */ public function theFirstOrderShouldHaveNumber($number) { $actualNumber = $this->indexPage->getColumnFields('Number')[0]; Assert::eq($actualNumber, $number, sprintf('Expected first order\'s number to be %s, but it is %s.', $number, $actualNumber)); }
/** * @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)); }
/** * @Then the last shipping method on the list should have :field :value */ public function theLastShippingMethodOnTheListShouldHave($field, $value) { $fields = $this->indexPage->getColumnFields($field); $actualValue = end($fields); Assert::same($actualValue, $value, sprintf('Expected last shipping method\'s %s to be "%s", but it is "%s".', $field, $value, $actualValue)); }
/** * @Then the last product attribute on the list should have name :name */ public function theLastProductAttributeOnTheListShouldHave($name) { $fields = $this->indexPage->getColumnFields('name'); $actualName = end($fields); Assert::same($actualName, $name, sprintf('Expected last product attribute\'s name to be "%s", but it is "%s".', $name, $actualName)); }