Elcodi\Bridge\BehatBridgeBundle\Context::responseShouldContainTestAttribute PHP Метод

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

    public function responseShouldContainTestAttribute($value)
    {
        $session = $this->getSession();
        $page = $session->getPage();
        $testAttribute = $page->find('xpath', "//*[@data-test='{$value}']");
        if ($testAttribute == null) {
            throw new ElementNotFoundException($session);
        }
    }