4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\CssSelector\Tests\Parser\Handler;
14 use Symfony\Component\CssSelector\Parser\Handler\NumberHandler;
15 use Symfony\Component\CssSelector\Parser\Token;
16 use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns;
18 class NumberHandlerTest extends AbstractHandlerTest
20 public function getHandleValueTestData()
23 array('12', new Token(Token::TYPE_NUMBER, '12', 0), ''),
24 array('12.34', new Token(Token::TYPE_NUMBER, '12.34', 0), ''),
25 array('+12.34', new Token(Token::TYPE_NUMBER, '+12.34', 0), ''),
26 array('-12.34', new Token(Token::TYPE_NUMBER, '-12.34', 0), ''),
28 array('12 arg', new Token(Token::TYPE_NUMBER, '12', 0), ' arg'),
29 array('12]', new Token(Token::TYPE_NUMBER, '12', 0), ']'),
33 public function getDontHandleValueTestData()
40 array('/* comment */'),
44 protected function generateHandler()
46 $patterns = new TokenizerPatterns();
48 return new NumberHandler($patterns);