/** * @expectedException \LengthException */ public function testReadingEmptyTextEndThrowsSplException() { Scanner::factory()->setText('')->readToken(); }
/** * @param string $text * @dataProvider providerBrokenUnicodeText * @expectedException \RuntimeException */ public function testSettingBrokenUnicodeTextThrowsSplException(string $text) { Scanner::factory()->setText($text); }
/** * Returns text scanner. * * @return Scanner */ protected function getScanner() : Scanner { if (null === $this->scanner) { $this->scanner = Scanner::factory(); } return $this->scanner; }