/** * @Then I should not be able to choose :name */ public function iShouldNotBeAbleToChoose($name) { Assert::false($this->createPage->isOptionAvailable($name), sprintf('I can choose %s, but i should not be able to do it', $name)); }
function it_creates_a_resource(CreatePageInterface $createPage) { $createPage->create()->shouldBeCalled(); $this->iAdd(); }
function it_throws_an_exception_if_resource_can_be_choose_but_it_should_not_be(CreatePageInterface $createPage) { $createPage->isOptionAvailable('France')->willReturn(true); $this->shouldThrow(\InvalidArgumentException::class)->during('iShouldNotBeAbleToChoose', ['France']); }
/** * @When I add it */ public function iAdd() { $this->createPage->create(); }