function it_throws_not_equal_exception_if_country_does_not_appear_in_the_store(IndexPageInterface $countryIndexPage, CountryInterface $country) { $country->getCode()->willReturn('FR'); $countryIndexPage->isResourceOnPage(['code' => 'FR'])->willReturn(false); $this->shouldThrow(\InvalidArgumentException::class)->during('countryShouldAppearInTheStore', [$country]); }
/** * @Then /^(country "[^"]+") should appear in the store$/ */ public function countryShouldAppearInTheStore(CountryInterface $country) { Assert::true($this->countryIndexPage->isResourceOnPage(['code' => $country->getCode()]), sprintf('Country %s should exist but it does not', $country->getCode())); }