/** * @covers ::createLexer */ public function testCreateLexerNotEmulative() { $project = $this->getMockBuilder('MaartenStaa\\PHPTA\\Processors\\Project')->setMethods(array('getUseEmulativeParser'))->setConstructorArgs(array(array(), array(), false))->getMock(); $project->expects($this->once())->method('getUseEmulativeParser')->will($this->returnValue(false)); $file = new File($project, 'filename', ''); $this->assertInstanceOf('PhpParser\\Lexer', $lexer = $file->createLexer()); $this->assertNotInstanceOf('PhpParser\\Lexer\\Emulative', $lexer); }