public function testFilteredScan()
 {
     $reader = new FileReader(__DIR__ . '/../Fixtures/files/TestFile.php');
     // Test the raw file with newlines and whitespaces
     $context = new DefaultScannerContext();
     $context->addTokenFilter(new TokenFilter\NoNewlinesFilter());
     $context->addTokenFilter(new TokenFilter\NoWhitespacesFilter());
     $scanner = new GenericScanner($context);
     $queue = $scanner->scan($reader);
     $this->assertTokens($this->expectedTokensNoEmptyToken, $queue);
 }
 public function __construct()
 {
     parent::__construct();
     $this->addTokenFilter(new TokenFilter\NoNewlinesFilter());
     $this->addTokenFilter(new TokenFilter\NoWhitespacesFilter());
     $this->addTokenFilter(new TokenFilter\NoCommentsFilter());
 }