You are here

class StringHandlerTest in Zircon Profile 8

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

Hierarchy

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

Expanded class hierarchy of StringHandlerTest

File

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

Namespace

Symfony\Component\CssSelector\Tests\Parser\Handler
View source
class StringHandlerTest extends AbstractHandlerTest {
  public function getHandleValueTestData() {
    return array(
      array(
        '"hello"',
        new Token(Token::TYPE_STRING, 'hello', 1),
        '',
      ),
      array(
        '"1"',
        new Token(Token::TYPE_STRING, '1', 1),
        '',
      ),
      array(
        '" "',
        new Token(Token::TYPE_STRING, ' ', 1),
        '',
      ),
      array(
        '""',
        new Token(Token::TYPE_STRING, '', 1),
        '',
      ),
      array(
        "'hello'",
        new Token(Token::TYPE_STRING, 'hello', 1),
        '',
      ),
      array(
        "'foo'bar",
        new Token(Token::TYPE_STRING, 'foo', 1),
        'bar',
      ),
    );
  }
  public function getDontHandleValueTestData() {
    return array(
      array(
        'hello',
      ),
      array(
        '>',
      ),
      array(
        '1',
      ),
      array(
        ' ',
      ),
    );
  }
  protected function generateHandler() {
    $patterns = new TokenizerPatterns();
    return new StringHandler($patterns, new TokenizerEscaping($patterns));
  }

}

Members