コード例 #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!');
 }
コード例 #2
0
 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();
 }