WordPress at a glance
class is not described

Symfony\Component\CssSelector\Tests\Parser\Handler

CommentHandlerTest{} WC 1.0

No Hooks.

Return

null. Nothing.

Usage

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

Methods

  1. generateHandler()
  2. getDontHandleValueTestData()
  3. getHandleValueTestData()
  4. testHandleValue($value, Token $unusedArgument, $remainingContent)

Code of CommentHandlerTest{} WC 5.3.0

<?php
class CommentHandlerTest extends AbstractHandlerTest
{
    /** @dataProvider getHandleValueTestData */
    public function testHandleValue($value, Token $unusedArgument, $remainingContent)
    {
        $reader = new Reader($value);
        $stream = new TokenStream();

        $this->assertTrue($this->generateHandler()->handle($reader, $stream));
        // comments are ignored (not pushed as token in stream)
        $this->assertStreamEmpty($stream);
        $this->assertRemainingContent($reader, $remainingContent);
    }

    public function getHandleValueTestData()
    {
        return array(
            // 2nd argument only exists for inherited method compatibility
            array('/* comment */', new Token(null, null, null), ''),
            array('/* comment */foo', new Token(null, null, null), 'foo'),
        );
    }

    public function getDontHandleValueTestData()
    {
        return array(
            array('>'),
            array('+'),
            array(' '),
        );
    }

    protected function generateHandler()
    {
        return new CommentHandler();
    }
}