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/tests/phpunit/testcases/core/functions/bpGetRefererPath.php

    r9819 r13314  
    1010    private $http_referer = '';
    1111
    12     public function setUp() {
    13         parent::setUp();
     12    public function set_up() {
     13        parent::set_up();
    1414
    1515        $this->_wp_http_referer = '';
     
    2525    }
    2626
    27     public function tearDown() {
     27    public function tear_down() {
    2828        if ( isset( $_REQUEST['_wp_http_referer'] ) ) {
    2929            unset( $_REQUEST['_wp_http_referer'] );
     
    4242        }
    4343
    44         parent::tearDown();
     44        parent::tear_down();
    4545    }
    4646
Note: See TracChangeset for help on using the changeset viewer.