You are here

class NumberHandlerTest in Zircon Profile 8

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

Hierarchy

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

Expanded class hierarchy of NumberHandlerTest

File

vendor/symfony/css-selector/Tests/Parser/Handler/NumberHandlerTest.php, line 18

Namespace

Symfony\Component\CssSelector\Tests\Parser\Handler
View source
class NumberHandlerTest extends AbstractHandlerTest {
  public function getHandleValueTestData() {
    return array(
      array(
        '12',
        new Token(Token::TYPE_NUMBER, '12', 0),
        '',
      ),
      array(
        '12.34',
        new Token(Token::TYPE_NUMBER, '12.34', 0),
        '',
      ),
      array(
        '+12.34',
        new Token(Token::TYPE_NUMBER, '+12.34', 0),
        '',
      ),
      array(
        '-12.34',
        new Token(Token::TYPE_NUMBER, '-12.34', 0),
        '',
      ),
      array(
        '12 arg',
        new Token(Token::TYPE_NUMBER, '12', 0),
        ' arg',
      ),
      array(
        '12]',
        new Token(Token::TYPE_NUMBER, '12', 0),
        ']',
      ),
    );
  }
  public function getDontHandleValueTestData() {
    return array(
      array(
        'hello',
      ),
      array(
        '>',
      ),
      array(
        '+',
      ),
      array(
        ' ',
      ),
      array(
        '/* comment */',
      ),
    );
  }
  protected function generateHandler() {
    $patterns = new TokenizerPatterns();
    return new NumberHandler($patterns);
  }

}

Members