Sulu\Bundle\ContactBundle\Behat\ContactContext::theContactShouldExist PHP Метод

theContactShouldExist() публичный Метод

public theContactShouldExist ( $firstName, $lastName )
    public function theContactShouldExist($firstName, $lastName)
    {
        $contact = $this->getEntityManager()->getRepository('SuluContactBundle:Contact')->findOneBy(['firstName' => $firstName, 'lastName' => $lastName]);
        if (!$contact) {
            throw new \Exception(sprintf('Contact with firstname "%s" and lastname "%s" should exist', $firstName, $lastName));
        }
    }