Пример #1
0
 /**
  * @Then I should not be able to choose :name
  */
 public function iShouldNotBeAbleToChoose($name)
 {
     try {
         $this->createPage->chooseName($name);
     } catch (ElementNotFoundException $exception) {
         return;
     }
     throw new \DomainException('Choose name should throw an exception!');
 }
 function it_throws_exception_if_country_name_can_be_chosen_again(CreatePageInterface $countryCreatePage)
 {
     $countryCreatePage->chooseName('France')->willThrow(\Exception::class);
     $this->shouldThrow(\Exception::class)->during('iShouldNotBeAbleToChoose', ['France']);
 }
Пример #3
0
 /**
  * @When I add it
  */
 public function iAddIt()
 {
     $this->createPage->create();
 }
Пример #4
0
 function it_adds_a_country(CreatePageInterface $countryCreatePage)
 {
     $countryCreatePage->create()->shouldBeCalled();
     $this->iAddIt();
 }