Changeset 54891 for trunk/tests/phpunit/tests/import/parser.php
- Timestamp:
- 11/29/2022 03:49:49 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/import/parser.php
r54402 r54891 34 34 // Regex based parser cannot detect malformed XML. 35 35 foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML' ) as $p ) { 36 $parser = new $p ;36 $parser = new $p(); 37 37 $result = $parser->parse( $file ); 38 38 $this->assertWPError( $result ); … … 52 52 foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML', 'WXR_Parser_Regex' ) as $p ) { 53 53 foreach ( array( $f1, $f2 ) as $file ) { 54 $parser = new $p ;54 $parser = new $p(); 55 55 $result = $parser->parse( $file ); 56 56 $this->assertWPError( $result ); … … 70 70 foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML', 'WXR_Parser_Regex' ) as $p ) { 71 71 $message = $p . ' failed'; 72 $parser = new $p ;72 $parser = new $p(); 73 73 $result = $parser->parse( $file ); 74 74 … … 168 168 foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML', 'WXR_Parser_Regex' ) as $p ) { 169 169 $message = $p . ' failed'; 170 $parser = new $p ;170 $parser = new $p(); 171 171 $result = $parser->parse( $file ); 172 172 … … 266 266 foreach ( array( 'WXR_Parser_SimpleXML', 'WXR_Parser_XML', 'WXR_Parser_Regex' ) as $p ) { 267 267 $message = 'Parser ' . $p; 268 $parser = new $p ;268 $parser = new $p(); 269 269 $result = $parser->parse( $file ); 270 270 … … 299 299 $file = DIR_TESTDATA . '/export/crazy-cdata.xml'; 300 300 301 $parser = new WXR_Parser_Regex ;301 $parser = new WXR_Parser_Regex(); 302 302 $result = $parser->parse( $file ); 303 303
Note: See TracChangeset
for help on using the changeset viewer.