Make WordPress Core

Changeset 875 in tests


Ignore:
Timestamp:
07/03/2012 05:24:03 PM (13 years ago)
Author:
nacin
Message:

Rename the unit tests wp-config.php to wp-tests-config.php. Also:

  • Rename wp-testdata to data
  • Rename wp-testlib to includes
  • Rename wp-testcase to tests
  • Begin to remove files from the old test suite we no longer need to port code from

fixes #98. see #42.

Location:
trunk
Files:
4 deleted
7 edited
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/bin/install.php

    r842 r875  
    1313define( 'WP_INSTALLING', true );
    1414require_once $config_file_path;
    15 require_once $config_dir . '/wp-testlib/functions.php';
     15require_once $config_dir . '/includes/functions.php';
    1616
    1717$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
  • trunk/bootstrap.php

    r872 r875  
    88require_once 'PHPUnit/Autoload.php';
    99
    10 $config_file_path = dirname( __FILE__ ) . '/wp-config.php';
     10$config_file_path = dirname( __FILE__ ) . '/wp-tests-config.php';
    1111
    1212/*
     
    2323require_once $config_file_path;
    2424
    25 define( 'DIR_TESTDATA', dirname( __FILE__ ) . '/wp-testdata' );
     25define( 'DIR_TESTDATA', dirname( __FILE__ ) . '/data' );
    2626
    2727if ( ! defined( 'WP_TESTS_FORCE_KNOWN_BUGS' ) )
     
    4747}
    4848
    49 require dirname( __FILE__ ) . '/wp-testlib/functions.php';
     49require dirname( __FILE__ ) . '/includes/functions.php';
    5050
    5151// Preset WordPress options defined in bootstrap file.
     
    6868_delete_all_posts();
    6969
    70 require dirname( __FILE__ ) . '/wp-testlib/testcase.php';
    71 require dirname( __FILE__ ) . '/wp-testlib/testcase-xmlrpc.php';
    72 require dirname( __FILE__ ) . '/wp-testlib/testcase-ajax.php';
    73 require dirname( __FILE__ ) . '/wp-testlib/exceptions.php';
    74 require dirname( __FILE__ ) . '/wp-testlib/utils.php';
     70require dirname( __FILE__ ) . '/includes/testcase.php';
     71require dirname( __FILE__ ) . '/includes/testcase-xmlrpc.php';
     72require dirname( __FILE__ ) . '/includes/testcase-ajax.php';
     73require dirname( __FILE__ ) . '/includes/exceptions.php';
     74require dirname( __FILE__ ) . '/includes/utils.php';
  • trunk/phpunit.xml

    r866 r875  
    77        <!-- Default test suite to run all tests -->
    88        <testsuite>
    9             <directory suffix=".php">wp-testcase</directory>
    10             <file phpVersion="5.3.0" phpVersionOperator=">=">wp-testcase/test_actions_closures.php</file>
    11             <exclude>wp-testcase/test_query_results.php</exclude>
     9            <directory suffix=".php">tests</directory>
     10            <file phpVersion="5.3.0">tests/test_actions_closures.php</file>
     11            <exclude>tests/test_query_results.php</exclude>
    1212        </testsuite>
    1313    </testsuites>
  • trunk/tests/test_http.php

    r874 r875  
    1616 */
    1717abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
    18     // You can use your own version of wp-testdata/WPHTTP-testcase-redirection-script.php here.
     18    // You can use your own version of data/WPHTTP-testcase-redirection-script.php here.
    1919    var $redirection_script = 'http://api.wordpress.org/core/tests/1.0/redirection.php';
    2020
     
    157157
    158158    function test_file_stream() {
    159         $url = 'http://unit-tests.svn.wordpress.org/trunk/wp-testdata/images/2004-07-22-DSC_0007.jpg'; // we'll test against a file in the unit test data
     159        $url = 'http://unit-tests.svn.wordpress.org/trunk/data/images/2004-07-22-DSC_0007.jpg'; // we'll test against a file in the unit test data
    160160        $size = 87348;
    161161        $res = wp_remote_request( $url, array( 'stream' => true, 'timeout' => 30 ) ); //Auto generate the filename.
  • trunk/tests/test_import_wp.php

    r861 r875  
    11<?php
    2 
    3 #include_once(DIR_TESTROOT.'/wp-testlib/wp-profiler.php');
    4 
    5 // need to include the importer as an external, so path may need to change...
    62
    73abstract class WP_Import_UnitTestCase extends WP_UnitTestCase {
  • trunk/tests/test_includes_functions.php

    r859 r875  
    9999    function test_wp_unique_filename() {
    100100        /* this test requires:
    101            - that you have dir + file 'wp-testdata/images/test-image.png',
     101           - that you have dir + file 'data/images/test-image.png',
    102102           - and that this dir is writeable
    103103           - there is an image 'test-image.png' that will be used to test unique filenames
  • trunk/tests/test_post_output.php

    r845 r875  
    141141        // permalink page
    142142        $link = '/2008/04/01/simple-gallery-test/';
    143         $this->http('/2008/04/01/simple-gallery-test/');
     143        $this->go_to('/2008/04/01/simple-gallery-test/');
    144144        the_post();
    145145        // filtered output
     
    217217
    218218        // permalink page
    219         $this->http('/2008/04/01/simple-gallery-test/');
     219        $this->go_to('/2008/04/01/simple-gallery-test/');
    220220        the_post();
    221221        // filtered output
Note: See TracChangeset for help on using the changeset viewer.