File tree 6 files changed +13
-6
lines changed
6 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 47
47
- name : Setup PHP version
48
48
uses : shivammathur/setup-php@v2
49
49
with :
50
- php-version : ' 7.1 '
50
+ php-version : ' 7.2 '
51
51
extensions : simplexml, mysql
52
52
tools : phpunit-polyfills
53
53
- name : Checkout source code
69
69
- name : Install composer
70
70
run : composer install --prefer-dist --no-progress --no-suggest
71
71
- name : Run phpunit
72
- run : phpunit
72
+ run : composer run-script phpunit
Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ assets/js/build
13
13
languages /fork.pot
14
14
15
15
.DS_Store
16
+ phpunit.result.cache
Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ import { createRoot } from '@wordpress/element';
2
2
3
3
import DesignPackNotice from './components/DesignPackNotice' ;
4
4
5
- const container = document . getElementById ( 'fork-design-pack-notice' ) ;
5
+ const container = document . createElement ( 'div' ) ;
6
+ container . id = 'fork-design-pack-notice' ;
7
+ document . body . appendChild ( container ) ;
6
8
7
9
if ( container ) {
8
10
createRoot ( container ) . render ( < DesignPackNotice /> ) ;
Original file line number Diff line number Diff line change 51
51
"format" : " phpcbf --standard=phpcs.xml --report-summary --report-source -s --runtime-set testVersion 7.0- " ,
52
52
"phpcs" : " phpcs --standard=phpcs.xml -s --runtime-set testVersion 7.0-" ,
53
53
"lint" : " composer run-script phpcs" ,
54
- "phpcs-i" : " phpcs -i"
54
+ "phpcs-i" : " phpcs -i" ,
55
+ "phpunit" : " phpunit"
55
56
}
56
57
}
Original file line number Diff line number Diff line change @@ -73,8 +73,6 @@ public function add_fse_design_pack_notice() {
73
73
),
74
74
'designPackNoticeData '
75
75
);
76
-
77
- echo '<div id="fork-design-pack-notice"></div> ' ;
78
76
}
79
77
80
78
/**
Original file line number Diff line number Diff line change 8
8
define ( 'FORK_IGNORE_SOURCE_CHECK ' , true );
9
9
10
10
$ _tests_dir = getenv ( 'WP_TESTS_DIR ' );
11
+
12
+ if ( class_exists ( '\Yoast\PHPUnitPolyfills\Autoload ' ) === false ) {
13
+ require_once dirname ( dirname ( __FILE__ ) ) . '/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php ' ;
14
+ }
15
+
11
16
if ( ! $ _tests_dir ) {
12
17
$ _tests_dir = '/tmp/wordpress-tests-lib ' ;
13
18
}
You can’t perform that action at this time.
0 commit comments