You are here

class EmptyStringParserTest in Zircon Profile 8

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

@author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>

Hierarchy

  • class \Symfony\Component\CssSelector\Tests\Parser\Shortcut\EmptyStringParserTest extends \Symfony\Component\CssSelector\Tests\Parser\Shortcut\PHPUnit_Framework_TestCase

Expanded class hierarchy of EmptyStringParserTest

File

vendor/symfony/css-selector/Tests/Parser/Shortcut/EmptyStringParserTest.php, line 20

Namespace

Symfony\Component\CssSelector\Tests\Parser\Shortcut
View source
class EmptyStringParserTest extends \PHPUnit_Framework_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);
  }

}

Members