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