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
This commit is contained in:
Andrew Nacin 2013-08-29 18:39:34 +00:00
parent d34baebc1d
commit 8045afd81b
318 changed files with 36 additions and 39 deletions

28
phpunit.xml.dist Normal file
View 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>

View File

@ -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>

View File

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View File

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View File

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 524 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1011 B

After

Width:  |  Height:  |  Size: 1011 B

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -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 ) ) {

Some files were not shown because too many files have changed in this diff Show More