public function iShouldNotBeAbleToChoose($name) { try { $this->createPage->chooseName($name); } catch (ElementNotFoundException $exception) { return; } throw new \DomainException('Choose name should throw an exception!'); }