Move PHPUnit tests into a tests/phpunit directory.
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root. see #25088. git-svn-id: https://develop.svn.wordpress.org/trunk@25165 602fd350-edb4-49c9-b593-d223f7449a82
28
phpunit.xml.dist
Normal file
@ -0,0 +1,28 @@
|
||||
<phpunit
|
||||
bootstrap="tests/phpunit/includes/bootstrap.php"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
>
|
||||
<testsuites>
|
||||
<!-- Default test suite to run all tests -->
|
||||
<testsuite>
|
||||
<directory suffix=".php">tests/phpunit/tests</directory>
|
||||
<exclude>tests/phpunit/tests/actions/closures.php</exclude>
|
||||
<exclude>tests/phpunit/tests/image/editor.php</exclude>
|
||||
<exclude>tests/phpunit/tests/image/editor_gd.php</exclude>
|
||||
<exclude>tests/phpunit/tests/image/editor_imagick.php</exclude>
|
||||
<file phpVersion="5.3.0">tests/phpunit/tests/actions/closures.php</file>
|
||||
<file phpVersion="5.3.0">tests/phpunit/tests/image/editor.php</file>
|
||||
<file phpVersion="5.3.0">tests/phpunit/tests/image/editor_gd.php</file>
|
||||
<file phpVersion="5.3.0">tests/phpunit/tests/image/editor_imagick.php</file>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>ajax</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
<logging>
|
||||
<log type="junit" target="tests/phpunit/build/logs/junit.xml" logIncompleteSkipped="false"/>
|
||||
</logging>
|
||||
</phpunit>
|
@ -1,28 +0,0 @@
|
||||
<phpunit
|
||||
bootstrap="includes/bootstrap.php"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
>
|
||||
<testsuites>
|
||||
<!-- Default test suite to run all tests -->
|
||||
<testsuite>
|
||||
<directory suffix=".php">tests</directory>
|
||||
<exclude>tests/actions/closures.php</exclude>
|
||||
<exclude>tests/image/editor.php</exclude>
|
||||
<exclude>tests/image/editor_gd.php</exclude>
|
||||
<exclude>tests/image/editor_imagick.php</exclude>
|
||||
<file phpVersion="5.3.0">tests/actions/closures.php</file>
|
||||
<file phpVersion="5.3.0">tests/image/editor.php</file>
|
||||
<file phpVersion="5.3.0">tests/image/editor_gd.php</file>
|
||||
<file phpVersion="5.3.0">tests/image/editor_imagick.php</file>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>ajax</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
<logging>
|
||||
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
|
||||
</logging>
|
||||
</phpunit>
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 198 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 524 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1011 B After Width: | Height: | Size: 1011 B |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
@ -4,21 +4,18 @@
|
||||
*/
|
||||
|
||||
|
||||
$config_file_path = dirname( __FILE__ ) . '/../wp-tests-config.php';
|
||||
if ( ! file_exists( $config_file_path ) ) {
|
||||
// Support having the config file one level up.
|
||||
$config_file_path = dirname( __FILE__ ) . '/../../wp-tests-config.php';
|
||||
$config_file_path = dirname( dirname( __FILE__ ) );
|
||||
if ( ! file_exists( $config_file_path . '/wp-tests-config.php' ) ) {
|
||||
// Support the config file from the root of the develop repository.
|
||||
if ( basename( $config_file_path ) === 'phpunit' && basename( dirname( $config_file_path ) ) === 'tests' )
|
||||
$config_file_path = dirname( dirname( $config_file_path ) );
|
||||
}
|
||||
$config_file_path .= '/wp-tests-config.php';
|
||||
|
||||
/*
|
||||
* Globalize some WordPress variables, because PHPUnit loads this file inside a function
|
||||
* See: https://github.com/sebastianbergmann/phpunit/issues/325
|
||||
*
|
||||
* These are not needed for WordPress 3.3+, only for older versions
|
||||
*/
|
||||
global $table_prefix, $wp_embed, $wp_locale, $_wp_deprecated_widgets_callbacks, $wp_widget_factory;
|
||||
|
||||
// These are still needed
|
||||
*/
|
||||
global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp, $phpmailer;
|
||||
|
||||
if ( !is_readable( $config_file_path ) ) {
|