Skip to content

Commit

Permalink
Use compulsory PHPUnit Polyfills package for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
noplanman committed Sep 9, 2023
1 parent 03a97e6 commit 22f150d
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: phpunit-polyfills

- name: Install WordPress
run: |
Expand All @@ -51,6 +52,7 @@ jobs:
cd "$WP_DEVELOP_DIR"
# set up tests config
mv wp-tests-config-sample.php wp-tests-config.php
sed -i "s/localhost/127.0.0.1/" wp-tests-config.php
sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
sed -i "s/yourusernamehere/root/" wp-tests-config.php
sed -i "s/yourpasswordhere/root/" wp-tests-config.php
Expand Down Expand Up @@ -82,6 +84,7 @@ jobs:
composer install --prefer-dist --no-progress
composer bin build install
composer compose
composer dump-autoload --dev
- name: Check PHP code
run: composer check-code
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"spatie/invade": "^2.0",
"bamarni/composer-bin-plugin": "^1.8",
"guzzlehttp/guzzle": "^7.8",
"league/html-to-markdown": "^5.1"
"league/html-to-markdown": "^5.1",
"yoast/phpunit-polyfills": "^2.0"
},
"autoload": {
"classmap": [
Expand Down
62 changes: 61 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 22f150d

Please sign in to comment.