Changeset 5610
- Timestamp:
- 01/30/2015 06:36:57 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpunit.xml.dist
r5323 r5610 12 12 </testsuite> 13 13 </testsuites> 14 <logging>15 <log type="junit" target="tests/phpunit/build/logs/junit.xml" logIncompleteSkipped="false"/>16 </logging>17 14 </phpunit> -
trunk/tests/phpunit/bootstrap.php
r5279 r5610 1 1 <?php 2 2 3 /** 4 * Bootstrap the plugin unit testing environment. 5 * 6 * Edit 'active_plugins' setting below to point to your main plugin file. 7 * 8 * @package wordpress-plugin-tests 9 */ 3 // Define our constants 4 echo "Defining constants...\n"; 5 require( dirname( __FILE__ ) . '/includes/define-constants.php' ); 10 6 11 // Activates this plugin in WordPress so it can be tested. 7 echo "Ensure bbPress is an active plugin...\n"; 12 8 $GLOBALS['wp_tests_options'] = array( 13 9 'active_plugins' => array( 'bbpress/bbpress.php' ), 14 10 ); 15 11 16 // If the develop repo location is defined (as WP_DEVELOP_DIR), use that 17 // location. Otherwise, we'll just assume that this plugin is installed in a 18 // WordPress develop SVN checkout. 12 // Bail if test suite cannot be found 13 if ( ! file_exists( WP_TESTS_DIR . '/includes/functions.php' ) ) { 14 die( "The WordPress PHPUnit test suite could not be found.\n" ); 15 } else { 16 echo "Loading WordPress PHPUnit test suite...\n"; 17 require( WP_TESTS_DIR . '/includes/functions.php' ); 18 } 19 19 20 if( false !== getenv( 'WP_DEVELOP_DIR' ) ) { 21 require getenv( 'WP_DEVELOP_DIR' ) . '/tests/phpunit/includes/bootstrap.php'; 22 } else { 23 require '../../../../tests/phpunit/includes/bootstrap.php'; 20 /** 21 * Load bbPress's PHPUnit test suite loader 22 */ 23 function _load_loader() { 24 require( BBP_TESTS_DIR . '/includes/loader.php' ); 24 25 } 26 tests_add_filter( 'muplugins_loaded', '_load_loader' ); 27 28 echo "Loading WordPress bootstrap...\n"; 29 require( WP_TESTS_DIR . '/includes/bootstrap.php' ); 30 31 echo "Loading bbPress testcase...\n"; 32 require( BBP_TESTS_DIR . '/includes/testcase.php' ); -
trunk/tests/phpunit/testcases/core/functions.php
r5271 r5610 9 9 10 10 /** 11 * Ensure that the plugin has been installed and activated. 11 * Ensure that bbPress function exists 12 */ 13 function test_bbpress_exists() { 14 $this->assertTrue( function_exists( 'bbpress' ) ); 15 } 16 17 /** 18 * Ensure that bbPress has been installed and activated. 12 19 */ 13 20 function test_plugin_activated() {
Note: See TracChangeset
for help on using the changeset viewer.