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 .


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
phpunit.xml.dist
tests
phpunit.xml.dist
phpunit
README.txtbuild.xml
data
includes

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

(image error) Size: 3.7 KiB

After

(image error) Size: 3.7 KiB

Before

(image error) Size: 48 KiB

After

(image error) Size: 48 KiB

Before

(image error) Size: 198 KiB

After

(image error) Size: 198 KiB

Before

(image error) Size: 1.0 KiB

After

(image error) Size: 1.0 KiB

Before

(image error) Size: 12 KiB

After

(image error) Size: 12 KiB

Before

(image error) Size: 2.1 KiB

After

(image error) Size: 2.1 KiB

Before

(image error) Size: 9.8 KiB

After

(image error) Size: 9.8 KiB

Before

(image error) Size: 524 B

After

(image error) Size: 524 B

Before

(image error) Size: 2.0 KiB

After

(image error) Size: 2.0 KiB

Before

(image error) Size: 1011 B

After

(image error) Size: 1011 B

Before

(image error) Size: 46 KiB

After

(image error) Size: 46 KiB

Before

(image error) Size: 67 KiB

After

(image error) 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 ) ) {

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