Changeset 59326 for trunk/tests/phpunit/tests/import/base.php
- Timestamp:
- 10/30/2024 11:27:08 PM (14 months ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/import/base.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/import/base.php
r56549 r59326 2 2 3 3 abstract class WP_Import_UnitTestCase extends WP_UnitTestCase { 4 5 /** 6 * Require the WordPress Importer plugin. 7 * 8 * Fails the test if the plugin is not installed. 9 */ 10 protected function require_importer() { 11 if ( ! file_exists( IMPORTER_PLUGIN_FOR_TESTS ) ) { 12 $this->fail( 'This test requires the WordPress Importer plugin to be installed in the test suite. See: https://make.wordpress.org/core/handbook/contribute/git/#unit-tests' ); 13 } 14 require_once IMPORTER_PLUGIN_FOR_TESTS; 15 } 16 4 17 /** 5 18 * Import a WXR file. … … 22 35 */ 23 36 protected function _import_wp( $filename, $users = array(), $fetch_files = true ) { 37 $this->require_importer(); 38 24 39 $importer = new WP_Import(); 25 40 $file = realpath( $filename );
Note: See TracChangeset
for help on using the changeset viewer.