WordPress at a glance
class is not described

Symfony\Component\CssSelector\Tests\Parser\Handler

NumberHandlerTest{} WC 1.0

No Hooks.

Return

null. Nothing.

Usage

$NumberHandlerTest = new NumberHandlerTest();
// use class methods

Methods

  1. generateHandler()
  2. getDontHandleValueTestData()
  3. getHandleValueTestData()

Code of NumberHandlerTest{} WC 5.2.2

<?php
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);
    }
}