You are here

public function ReaderTest::testGetSubstring in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/css-selector/Tests/Parser/ReaderTest.php \Symfony\Component\CssSelector\Tests\Parser\ReaderTest::testGetSubstring()

File

vendor/symfony/css-selector/Tests/Parser/ReaderTest.php, line 45

Class

ReaderTest

Namespace

Symfony\Component\CssSelector\Tests\Parser

Code

public function testGetSubstring() {
  $reader = new Reader('hello');
  $this
    ->assertEquals('he', $reader
    ->getSubstring(2));
  $this
    ->assertEquals('el', $reader
    ->getSubstring(2, 1));
  $this
    ->assignPosition($reader, 2);
  $this
    ->assertEquals('ll', $reader
    ->getSubstring(2));
  $this
    ->assertEquals('lo', $reader
    ->getSubstring(2, 1));
}