/** * @Then the store should be available in the :name language */ public function storeShouldBeAvailableInLanguage($name) { $doesLocaleExist = $this->indexPage->isResourceOnPage(['name' => $name]); Assert::true($doesLocaleExist, sprintf('Locale %s should exist but it does not', $name)); }
function it_throws_an_exception_if_resource_can_not_be_founded_on_page(IndexPageInterface $indexPage) { $indexPage->isResourceOnPage(['name' => 'Norwegian'])->willReturn(false); $this->shouldThrow(\InvalidArgumentException::class)->during('storeShouldBeAvailableInLanguage', ['Norwegian']); }