Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/13/2022 08:58:51 AM (21 months ago)
Author:
imath
Message:

Fully enjoy Yoast’s PHPUnit polyfills

Using these polyfills let us use PHPUnit v9.x for our tests and add PHP 8.1 to our testing matrix. Some additional edits to our PHP unit tests suite were needed:

  • Stop using PHPunit deprecated functions.
  • Rename some BP_UnitTestCase methods to use Yoast's polyfills.
  • Edit the PHP Unit test GH action and also run this action on pull requests.
  • Update some composer dependencies, remove the one about phpunit/phpunit:^7.5 and add a new composer script to use PHPUnit v9.x.

Props renatonascalves, rafiahmedd

Closes https://github.com/buddypress/buddypress/pull/13
Fixes #8649

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/unit-tests.yml

    r13297 r13314  
    22
    33on:
     4  pull_request:
    45  push:
    56    branches: [ master ]
     
    1213      fail-fast: false
    1314      matrix:
    14         php: ['7.4', '8.0']
     15        php: ['7.4', '8.0', '8.1']
    1516        wp_version: ['master']
    1617        include:
     
    5960          composer-options: "--ignore-platform-reqs"
    6061
    61       - name: Adjust wp-phpunit version
    62         run: if [ ${{ env.WP_VERSION }} == '5.7' ]; then composer require --dev "wp-phpunit/wp-phpunit:5.7"; fi
    63 
    6462      - name: Cache node modules
    6563        uses: actions/cache@v2
Note: See TracChangeset for help on using the changeset viewer.