http://us.php.net/manual/en/language.types.string.php
addslashes() is convenient, but this way we have no legitimate
usage, and it's easier to have it banned everywhere.
*/
$className = str_replace( '.', '_', ucfirst( basename( $filename, '.txt' ) ) );
- eval( "/** @group Database\n@group Parser\n*/ class $className extends NewParserTest { protected \$file = \"" . addslashes( $filename ) . "\"; } " );
+ eval( "/** @group Database\n@group Parser\n*/ class $className extends NewParserTest { protected \$file = '" . strtr( $filename, array( "'" => "\\'", '\\' => '\\\\' ) ) . "'; } " );
$parserTester = new $className( $testsName );
$suite->addTestSuite( new ReflectionClass ( $parserTester ) );