File tree Expand file tree Collapse file tree 4 files changed +24
-2
lines changed
Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "core" : null ,
3- "plugins" : [ " ." ]
3+ "plugins" : [ " ." ],
4+ "env" : {
5+ "tests" : {
6+ "config" : {
7+ "WP_TESTS_DOMAIN" : " example.org" ,
8+ "WP_SITEURL" : " http://example.org" ,
9+ "WP_HOME" : " http://example.org"
10+ },
11+ "mappings" : {
12+ "wp-content/plugins/activitypub" : " ." ,
13+ "wp-content/plugins/activitypub/tests" : " ./tests"
14+ }
15+ }
16+ }
417}
Original file line number Diff line number Diff line change 4040 " bin/install-wp-tests.sh activitypub-test root activitypub-test test-db latest true" ,
4141 " vendor/bin/phpunit"
4242 ],
43+ "test:wp-env" : [
44+ " wp-env run tests-cli --env-cwd=\" wp-content/plugins/activitypub\" vendor/bin/phpunit"
45+ ],
4346 "lint" : [
4447 " vendor/bin/phpcs"
4548 ],
Original file line number Diff line number Diff line change 1313 "dev" : " wp-scripts start" ,
1414 "build" : " wp-scripts build" ,
1515 "env-start" : " wp-env start && wp-env run cli wp rewrite structure '/%year%/%monthnum%/%postname%/'" ,
16- "env-stop" : " wp-env stop"
16+ "env-stop" : " wp-env stop" ,
17+ "env-test" : " wp-env run tests-cli --env-cwd=\" wp-content/plugins/activitypub\" vendor/bin/phpunit"
1718 },
1819 "license" : " MIT" ,
1920 "bugs" : {
Original file line number Diff line number Diff line change 88\define ( 'ACTIVITYPUB_DISABLE_REACTIONS ' , false );
99\define ( 'ACTIVITYPUB_DISABLE_INCOMING_INTERACTIONS ' , false );
1010
11+ // Defined here because setting them in .wp-env.json doesn't work for some reason.
12+ \define ( 'WP_TESTS_DOMAIN ' , 'example.org ' );
13+ \define ( 'WP_SITEURL ' , 'http://example.org ' );
14+ \define ( 'WP_HOME ' , 'http://example.org ' );
15+
1116$ _tests_dir = \getenv ( 'WP_TESTS_DIR ' );
1217
1318if ( ! $ _tests_dir ) {
You can’t perform that action at this time.
0 commit comments