phpbb_functional_test_case::assert_find_one_checkbox PHP Method

assert_find_one_checkbox() public method

Searches for an input element of type checkbox with the name $name using $crawler. Contains an assertion that only one such checkbox exists within the scope of $crawler.
public assert_find_one_checkbox ( Symfony\Component\DomCrawler\Crawler $crawler, string $name, string $message = '' ) : Symfony\Component\DomCrawler\Crawler
$crawler Symfony\Component\DomCrawler\Crawler
$name string
$message string
return Symfony\Component\DomCrawler\Crawler
    public function assert_find_one_checkbox($crawler, $name, $message = '')
    {
        $query = sprintf('//input[@type="checkbox" and @name="%s"]', $name);
        $result = $crawler->filterXPath($query);
        $this->assertEquals(1, sizeof($result), $message ?: 'Failed asserting that exactly one checkbox with name' . " {$name} exists in crawler scope.");
        return $result;
    }