parse($code); $this->assertEquals( $this->canonicalize($dump), $this->canonicalize($prettyPrinter->$method($stmts)), $name ); } /** * @dataProvider provideTestPrettyPrint * @covers PHPParser_PrettyPrinter_Default */ public function testPrettyPrint($name, $code, $dump) { $this->doTestPrettyPrintMethod('prettyPrint', $name, $code, $dump); } /** * @dataProvider provideTestPrettyPrintFile * @covers PHPParser_PrettyPrinter_Default */ public function testPrettyPrintFile($name, $code, $dump) { $this->doTestPrettyPrintMethod('prettyPrintFile', $name, $code, $dump); } public function provideTestPrettyPrint() { return $this->getTests(dirname(__FILE__) . '/../../code/prettyPrinter', 'test'); } public function provideTestPrettyPrintFile() { return $this->getTests(dirname(__FILE__) . '/../../code/prettyPrinter', 'file-test'); } }