Changeset 13720
- Timestamp:
- 01/31/2024 08:09:06 PM (12 months ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/composer.json
r13684 r13720 47 47 "require-dev": { 48 48 "buddypress/bp-coding-standards": "dev-trunk", 49 "wp-phpunit/wp-phpunit": "^6.4",50 49 "yoast/phpunit-polyfills": "^1.0" 51 50 }, 52 51 "scripts": { 53 52 "test": "@php ./vendor/phpunit/phpunit/phpunit", 53 "test_multi": "@php ./vendor/phpunit/phpunit/phpunit -c tests/phpunit/multisite.xml", 54 54 "phpcs": "@php ./vendor/bin/phpcs" 55 55 } -
trunk/npm-shrinkwrap.json
r13684 r13720 12 12 "@wordpress/babel-preset-default": "^7.32.0", 13 13 "@wordpress/browserslist-config": "^5.31.0", 14 "@wordpress/env": "^ 5.6.0",14 "@wordpress/env": "^9.0.0", 15 15 "@wordpress/scripts": "^26.19.0", 16 16 "@wordpress/stylelint-config": "~19.1.0", … … 5031 5031 }, 5032 5032 "node_modules/@wordpress/env": { 5033 "version": " 5.16.0",5034 "resolved": "https://registry.npmjs.org/@wordpress/env/-/env- 5.16.0.tgz",5035 "integrity": "sha512- zx6UO8PuJBrQ34cfeedK1HlGHLFaj7oWzTo9tTt+noB79Ttqc4+a0lYwDqBLLJhlHU+cWgcyOP2lB6TboXH0xA==",5033 "version": "9.0.0", 5034 "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-9.0.0.tgz", 5035 "integrity": "sha512-Fyec0k5N7kaXVIpTnJ2zO/n3CIiq8cPDsUaFoLVKI+yv2cVuq1dSQyc1lLXB9Gu+SNvmfbq7nNVVmNfKgpAkrw==", 5036 5036 "dev": true, 5037 5037 "dependencies": { 5038 5038 "chalk": "^4.0.0", 5039 5039 "copy-dir": "^1.3.0", 5040 "docker-compose": "^0.2 2.2",5040 "docker-compose": "^0.24.3", 5041 5041 "extract-zip": "^1.6.7", 5042 5042 "got": "^11.8.5", … … 11116 11116 }, 11117 11117 "node_modules/docker-compose": { 11118 "version": "0.22.2", 11119 "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-0.22.2.tgz", 11120 "integrity": "sha512-iXWb5+LiYmylIMFXvGTYsjI1F+Xyx78Jm/uj1dxwwZLbWkUdH6yOXY5Nr3RjbYX15EgbGJCq78d29CmWQQQMPg==", 11121 "dev": true, 11118 "version": "0.24.3", 11119 "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-0.24.3.tgz", 11120 "integrity": "sha512-x3/QN3AIOMe7j2c8f/jcycizMft7dl8MluoB9OGPAYCyKHHiPUFqI9GjCcsU0kYy24vYKMCcfR6+5ZaEyQlrxg==", 11121 "dev": true, 11122 "dependencies": { 11123 "yaml": "^2.2.2" 11124 }, 11122 11125 "engines": { 11123 11126 "node": ">= 6.0.0" … … 31452 31455 "dev": true 31453 31456 }, 31457 "node_modules/yaml": { 31458 "version": "2.3.4", 31459 "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", 31460 "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", 31461 "dev": true, 31462 "engines": { 31463 "node": ">= 14" 31464 } 31465 }, 31454 31466 "node_modules/yargs": { 31455 31467 "version": "17.7.2", -
trunk/package.json
r13703 r13720 9 9 "@wordpress/browserslist-config": "^5.31.0", 10 10 "@wordpress/scripts": "^26.19.0", 11 "@wordpress/env": "^ 5.6.0",11 "@wordpress/env": "^9.0.0", 12 12 "@wordpress/stylelint-config": "~19.1.0", 13 13 "autoprefixer": "^9.8.8", … … 52 52 "build:admin": "wp-scripts build --webpack-src-dir=src/js/admin --config src/js/admin/webpack.config.js && grunt move:admin:js", 53 53 "wp-env": "wp-env", 54 "test-php": "npm run wp-env run phpunit 'php /var/www/html/wp-content/plugins/buddypress/vendor/phpunit/phpunit/phpunit -c /var/www/html/wp-content/plugins/buddypress/tests/phpunit/env.xml'",55 "test-php:group": "npm run wp-env run phpunit 'php /var/www/html/wp-content/plugins/buddypress/vendor/phpunit/phpunit/phpunit -c /var/www/html/wp-content/plugins/buddypress/tests/phpunit/env.xml --group $npm_confi_g'",56 "test-php-multisite": "npm run wp-env run phpunit 'php /var/www/html/wp-content/plugins/buddypress/vendor/phpunit/phpunit/phpunit -c /var/www/html/wp-content/plugins/buddypress/tests/phpunit/env.multisite.xml'",57 "test-php-multisite:group": "npm run wp-env run phpunit 'php /var/www/html/wp-content/plugins/buddypress/vendor/phpunit/phpunit/phpunit -c /var/www/html/wp-content/plugins/buddypress/tests/phpunit/env.multisite.xml --group $npm_confi_g'",54 "test-php": "npm run wp-env run cli -- --env-cwd=wp-content/plugins/buddypress composer test", 55 "test-php:group": "npm run wp-env run cli -- --env-cwd=wp-content/plugins/buddypress composer test -- -- --group ", 56 "test-php-multisite": "npm run wp-env run cli -- --env-cwd=wp-content/plugins/buddypress composer test_multi", 57 "test-php-multisite:group": "npm run wp-env run cli -- --env-cwd=wp-content/plugins/buddypress composer test_multi -- -- --group ", 58 58 "download:cli": "curl -L -o 'cli-archive.zip' https://github.com/buddypress/wp-cli-buddypress/archive/2.0.2.zip && unzip -qq cli-archive.zip && mv wp-cli-buddypress-2.0.2 build/cli && rm cli-archive.zip", 59 59 "download:rest": "curl -L -o 'rest-archive.zip' https://github.com/buddypress/BP-REST/archive/master.zip && unzip -qq rest-archive.zip && mv BP-REST-master build/bp-rest && rm rest-archive.zip" -
trunk/tests/phpunit/bootstrap.php
r13314 r13720 1 1 <?php 2 2 const WP_TESTS_PHPUNIT_POLYFILLS_PATH = __DIR__ . '/../../vendor/yoast/phpunit-polyfills'; 3 4 if ( defined( 'BP_USE_WP_ENV_TESTS' ) ) {5 // wp-env setup.6 define( 'WP_TESTS_CONFIG_FILE_PATH', dirname( __FILE__ ) . '/assets/phpunit-wp-config.php' );7 define( 'WP_TESTS_CONFIG_PATH', WP_TESTS_CONFIG_FILE_PATH );8 9 // Use WP PHPUnit.10 require_once dirname( dirname( dirname( __FILE__ ) ) ) . '/vendor/wp-phpunit/wp-phpunit/__loaded.php';11 }12 3 13 4 require( dirname( __FILE__ ) . '/includes/define-constants.php' ); -
trunk/tests/phpunit/includes/define-constants.php
r12853 r13720 21 21 * up the directory tree 22 22 */ 23 if ( false !== getenv( 'WP_PHPUNIT__DIR' ) && defined( 'BP_USE_WP_ENV_TESTS' ) ) { 24 define( 'WP_TESTS_DIR', getenv( 'WP_PHPUNIT__DIR' ) ); 25 define( 'WP_ROOT_DIR', '/var/www/html' ); 26 } elseif ( false !== getenv( 'WP_TESTS_DIR' ) ) { 23 if ( false !== getenv( 'WP_TESTS_DIR' ) ) { 27 24 define( 'WP_TESTS_DIR', getenv( 'WP_TESTS_DIR' ) ); 28 25 define( 'WP_ROOT_DIR', WP_TESTS_DIR ); -
trunk/tests/phpunit/testcases/core/functions.php
r13705 r13720 834 834 835 835 $bp = buddypress(); 836 $reset_current_site = isset( $GLOBALS['current_site'] ) ? $GLOBALS['current_site'] : null; 836 837 $reset_bp_pages = $bp->pages; 837 838 $reset_bp_active_components = $bp->active_components; … … 842 843 ) ); 843 844 845 if ( defined( 'WP_HOME' ) ) { 846 $GLOBALS['current_site']->domain = get_site( $b )->domain; 847 } 848 844 849 $bp->active_components['newcomponent'] = 1; 845 850 add_filter( 'bp_core_get_directory_page_default_titles', array( $this, 'add_newcomponent_page_title' ) ); … … 851 856 852 857 $new_component_page_id = $bp_pages['newcomponent']; 858 853 859 $this->assertNotSame( 'newcomponent', get_post_field( 'post_name', $new_component_page_id ), 'The component slug should not conflict with subsite name.' ); 854 860 … … 858 864 $bp->pages = $reset_bp_pages; 859 865 $bp->active_components = $reset_bp_active_components; 866 867 if ( defined( 'WP_HOME' ) ) { 868 $GLOBALS['current_site'] = $reset_current_site; 869 } 860 870 } 861 871 -
trunk/tests/phpunit/testcases/routing/members.php
r13468 r13720 65 65 remove_filter( 'bp_members_member_type_base', array( $this, 'filter_member_type_base' ) ); 66 66 67 $this->assertSame( $url, 'http:// example.org/members/bp-member-type/foo/' );67 $this->assertSame( $url, 'http://' . trailingslashit( WP_TESTS_DOMAIN ) . 'members/bp-member-type/foo/' ); 68 68 } 69 69
Note: See TracChangeset
for help on using the changeset viewer.