Example #1
0
 /**
  * @return void
  * @covers \pdepend\reflection\parser\ParserTokens
  * @covers \pdepend\reflection\parser\Tokenizer
  * @covers \pdepend\reflection\parser\Token
  * @group reflection
  * @group reflection::parser
  * @group unittest
  */
 public function testTokenizerTranslatesTStringSelfIntoTSelf()
 {
     $tokenType = 0;
     for ($i = 0; $i < 7; ++$i) {
         $tokenType = $this->_fixture->next()->type;
     }
     $this->assertEquals(ParserTokens::T_SELF, $tokenType);
 }
Example #2
0
 /**
  * This method returns the next available token instance or <b>null</b> when
  * no next token exists.
  *
  * @return \pdepend\reflection\parser\Token
  */
 private function _next()
 {
     if (is_object($token = $this->_tokenizer->next())) {
         return $token;
     }
     return null;
 }