You are here

protected function AbstractHandlerTest::assertRemainingContent in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php \Symfony\Component\CssSelector\Tests\Parser\Handler\AbstractHandlerTest::assertRemainingContent()
3 calls to AbstractHandlerTest::assertRemainingContent()
AbstractHandlerTest::testDontHandleValue in vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php
@dataProvider getDontHandleValueTestData
AbstractHandlerTest::testHandleValue in vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php
@dataProvider getHandleValueTestData
CommentHandlerTest::testHandleValue in vendor/symfony/css-selector/Tests/Parser/Handler/CommentHandlerTest.php
@dataProvider getHandleValueTestData

File

vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php, line 57

Class

AbstractHandlerTest
@author Jean-François Simon <contact@jfsimon.fr>

Namespace

Symfony\Component\CssSelector\Tests\Parser\Handler

Code

protected function assertRemainingContent(Reader $reader, $remainingContent) {
  if ('' === $remainingContent) {
    $this
      ->assertEquals(0, $reader
      ->getRemainingLength());
    $this
      ->assertTrue($reader
      ->isEOF());
  }
  else {
    $this
      ->assertEquals(strlen($remainingContent), $reader
      ->getRemainingLength());
    $this
      ->assertEquals(0, $reader
      ->getOffset($remainingContent));
  }
}