You are here

class IdentifierHandlerTest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php \Symfony\Component\CssSelector\Tests\Parser\Handler\IdentifierHandlerTest

Hierarchy

  • class \Symfony\Component\CssSelector\Tests\Parser\Handler\AbstractHandlerTest extends \Symfony\Component\CssSelector\Tests\Parser\Handler\PHPUnit_Framework_TestCase

Expanded class hierarchy of IdentifierHandlerTest

File

vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php, line 19

Namespace

Symfony\Component\CssSelector\Tests\Parser\Handler
View source
class IdentifierHandlerTest extends AbstractHandlerTest {
  public function getHandleValueTestData() {
    return array(
      array(
        'foo',
        new Token(Token::TYPE_IDENTIFIER, 'foo', 0),
        '',
      ),
      array(
        'foo|bar',
        new Token(Token::TYPE_IDENTIFIER, 'foo', 0),
        '|bar',
      ),
      array(
        'foo.class',
        new Token(Token::TYPE_IDENTIFIER, 'foo', 0),
        '.class',
      ),
      array(
        'foo[attr]',
        new Token(Token::TYPE_IDENTIFIER, 'foo', 0),
        '[attr]',
      ),
      array(
        'foo bar',
        new Token(Token::TYPE_IDENTIFIER, 'foo', 0),
        ' bar',
      ),
    );
  }
  public function getDontHandleValueTestData() {
    return array(
      array(
        '>',
      ),
      array(
        '+',
      ),
      array(
        ' ',
      ),
      array(
        '*|foo',
      ),
      array(
        '/* comment */',
      ),
    );
  }
  protected function generateHandler() {
    $patterns = new TokenizerPatterns();
    return new IdentifierHandler($patterns, new TokenizerEscaping($patterns));
  }

}

Members