File tree 4 files changed +25
-27
lines changed
4 files changed +25
-27
lines changed Original file line number Diff line number Diff line change @@ -24,24 +24,13 @@ jobs:
24
24
with :
25
25
php-version : ${{ matrix.php-versions }}
26
26
coverage : none
27
- tools : composer
27
+ tools : composer, phpunit-polyfills
28
28
extensions : mysql
29
- - name : Get Composer cache directory
30
- id : composer-cache
31
- run : echo "::set-output name=dir::$(composer config cache-files-dir)"
32
- - name : Setup cache
33
-
34
- with :
35
- path : ${{ steps.composer-cache.outputs.dir }}
36
- # Use the hash of composer.json as the key for your cache if you do not commit composer.lock.
37
- key : ${{ runner.os }}-php-${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }}
38
- # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
39
- restore-keys : ${{ runner.os }}-composer-
40
- - name : Install dependencies
41
- run : composer install --prefer-dist --no-progress
42
- - name : Setup Test Environment
43
- run : composer setup-local-tests
44
- - name : Unit Testing
45
- run : composer phpunit
46
- env :
47
- PHP_VERSION : ${{ matrix.php-versions }}
29
+ - name : Install Composer dependencies for PHP
30
+ uses : " ramsey/composer-install@v1"
31
+ - name : Setup Test Environment
32
+ run : composer setup-local-tests
33
+ - name : Unit Testing
34
+ run : composer phpunit
35
+ env :
36
+ PHP_VERSION : ${{ matrix.php-versions }}
Original file line number Diff line number Diff line change 25
25
"source" : " https://github.com/indieweb/wordpress-indieweb"
26
26
},
27
27
"require-dev" : {
28
- "dealerdirect/phpcodesniffer-composer-installer" : " ^0.7 " ,
29
- "squizlabs/php_codesniffer" : " ^2.2 || ^3.6 " ,
28
+ "dealerdirect/phpcodesniffer-composer-installer" : " * " ,
29
+ "squizlabs/php_codesniffer" : " * " ,
30
30
"phpcompatibility/php-compatibility" : " *" ,
31
31
"wp-coding-standards/wpcs" : " *" ,
32
32
"phpcompatibility/phpcompatibility-wp" : " *" ,
33
33
"php-parallel-lint/php-parallel-lint" : " ^1.2" ,
34
34
"wp-cli/i18n-command" : " ^2.2" ,
35
35
"sebastian/phpcpd" : " ^3.0 || ^5.0 || ^6.0" ,
36
- "phpunit/phpunit" : " ^5.0 || ^6.0 || ^7.5"
36
+ "phpunit/phpunit" : " ^5.7.21 || ^6.0 || ^7.5" ,
37
+ "yoast/phpunit-polyfills" : " ^1.0"
37
38
},
38
39
"prefer-stable" : true ,
39
40
"scripts" : {
Original file line number Diff line number Diff line change 1
- # Copyright (C) 2020 IndieWebCamp WordPress Outreach Club
1
+ # Copyright (C) 2022 IndieWebCamp WordPress Outreach Club
2
2
# This file is distributed under the MIT.
3
3
msgid ""
4
4
msgstr ""
5
- "Project-Id-Version : IndieWeb 3.4.3 \n "
5
+ "Project-Id-Version : IndieWeb 3.4.4 \n "
6
6
"Report-Msgid-Bugs-To : https://wordpress.org/support/plugin/wordpress-indieweb\n "
7
7
"Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
8
8
"
Language-Team :
LANGUAGE <[email protected] >\n "
9
9
"MIME-Version : 1.0\n "
10
10
"Content-Type : text/plain; charset=UTF-8\n "
11
11
"Content-Transfer-Encoding : 8bit\n "
12
- "POT-Creation-Date : 2020-08-16T01:20:48 +00:00\n "
12
+ "POT-Creation-Date : 2022-05-17T02:04:26 +00:00\n "
13
13
"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
14
- "X-Generator : WP-CLI 2.4 .0\n "
14
+ "X-Generator : WP-CLI 2.6 .0\n "
15
15
"X-Domain : indieweb\n "
16
16
17
17
#. Plugin Name of the plugin
Original file line number Diff line number Diff line change 16
16
exit ( 1 );
17
17
}
18
18
19
+ // Forward custom PHPUnit Polyfills configuration to PHPUnit bootstrap file.
20
+ $ _phpunit_polyfills_path = getenv ( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH ' );
21
+ if ( false !== $ _phpunit_polyfills_path ) {
22
+ define ( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH ' , $ _phpunit_polyfills_path );
23
+ }
24
+
19
25
// Give access to tests_add_filter() function.
20
26
require_once $ _tests_dir . '/includes/functions.php ' ;
21
27
28
+ require_once dirname ( dirname ( __FILE__ ) ) . '/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php ' ;
29
+
22
30
/**
23
31
* Manually load the plugin being tested.
24
32
*/
You can’t perform that action at this time.
0 commit comments