Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/13/2022 08:58:51 AM (3 years 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/groups/template/bpGroupStatusMessage.php

    r13085 r13314  
    99    private $groups_template = null;
    1010
    11     public function setUp() {
    12         parent::setUp();
     11    public function set_up() {
     12        parent::set_up();
    1313        $this->current_user = bp_loggedin_user_id();
    1414        $this->set_current_user( 0 );
     
    1919    }
    2020
    21     public function tearDown() {
     21    public function tear_down() {
    2222        $this->set_current_user( $this->current_user );
    2323        if ( $this->groups_template ) {
     
    2525        }
    2626
    27         parent::tearDown();
     27        parent::tear_down();
    2828    }
    2929
Note: See TracChangeset for help on using the changeset viewer.