/** * @dataProvider provideTestLexNewFeatures */ public function testLeaveStuffAloneInStrings($code) { $stringifiedToken = '"' . addcslashes($code, '"\\') . '"'; $this->lexer->startLexing('<?php ' . $stringifiedToken); $this->assertEquals(PHPParser_Parser::T_CONSTANT_ENCAPSED_STRING, $this->lexer->getNextToken($text)); $this->assertEquals($stringifiedToken, $text); $this->assertEquals(0, $this->lexer->getNextToken()); }