Beispiel #1
0
 public function testTripleCase()
 {
     $tokenizer = new Tokenizer(',', new Enclosure('|', '|'));
     $tokens = $tokenizer->tokenize('|-||-|||');
     $this->assertTrue($tokens[0]->is(Token::ENCLOSURE_BOUNDARY));
     $this->assertTrue($tokens[2]->is(Token::ENCLOSURE_ESCAPED_BOUNDARY));
     $this->assertTrue($tokens[4]->is(Token::ENCLOSURE_TRIPLE_BOUNDARY));
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 protected function build()
 {
     if (0 === count($this->tokens)) {
         try {
             $this->tokens = $this->tokenizer->tokenize($this->reader->readLine());
         } catch (ReadingFinishedException $e) {
             $this->finish();
         }
     }
 }