markTestSkipped( 'Tidy not found' ); } } /** * @dataProvider provideTestWrapping */ public function testTidyWrapping( $expected, $text, $msg = '' ) { $text = MWTidy::tidy( $text ); // We don't care about where Tidy wants to stick is

s $text = trim( preg_replace( '##', '', $text ) ); // Windows, we love you! $text = str_replace( "\r", '', $text ); $this->assertEquals( $expected, $text, $msg ); } public static function provideTestWrapping() { $testMathML = <<<'MathML' a x 2 + b x + c MathML; return array( array( 'foo', 'foo', ' should survive tidy' ), array( 'foo', 'foo', ' should survive tidy' ), array( 'foo', 'foo', ' should survive tidy' ), array( "\nfoo", 'foo', ' should survive tidy' ), array( "\nfoo", 'foo', ' should survive tidy' ), array( $testMathML, $testMathML, ' should survive tidy' ), ); } }