getTokens() public method

Returns an array with all tokens within this file.
public getTokens ( ) : array(array)
return array(array)
 /**
  * testGetTokensDelegatesCallToCacheRestoreWithFileId
  *
  * @return void
  */
 public function testGetTokensDelegatesCallToCacheRestoreWithFileId()
 {
     $cache = $this->createCacheFixture();
     $cache->expects($this->once())->method('type')->with(self::equalTo('tokens'))->will($this->returnValue($cache));
     $cache->expects($this->once())->method('restore')->with(self::equalTo(__FUNCTION__));
     $compilationUnit = new ASTCompilationUnit(null);
     $compilationUnit->setCache($cache);
     $compilationUnit->setId(__FUNCTION__);
     $compilationUnit->getTokens();
 }