WordPress at a glance
class is not described

Symfony\Component\CssSelector\Tests\Parser\Shortcut

EmptyStringParserTest{} WC 1.0

No Hooks.

Return

null. Nothing.

Usage

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

Methods

  1. testParse()

Code of EmptyStringParserTest{} WC 5.2.2

<?php
class EmptyStringParserTest extends TestCase
{
    public function testParse()
    {
        $parser = new EmptyStringParser();
        $selectors = $parser->parse('');
        $this->assertCount(1, $selectors);

        /** @var SelectorNode $selector */
        $selector = $selectors[0];
        $this->assertEquals('Element[*]', (string) $selector->getTree());

        $selectors = $parser->parse('this will produce an empty array');
        $this->assertCount(0, $selectors);
    }
}