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