Skip to content

Commit

Permalink
[feature/systemsdev-3038] Minimal changes to get to PHP 8.0 compatibi…
Browse files Browse the repository at this point in the history
…lity.
  • Loading branch information
Ivan Čurdinjaković authored and icurdinj committed May 2, 2023
1 parent 39705fb commit be25331
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@
"lucatume/function-mocker": "^1.3",
"symfony/dom-crawler": "^5.0",
"symfony/css-selector": "^5.0",
"phpunit/phpunit": "^7.5"
"phpunit/phpunit": "^8.5"
},
"autoload": {
"classmap": [
"phpunit/otgs-testcase.php",
"phpunit/Mocks",
"phpunit/stubs"
]
},
"config": {
"sort-packages": true,
"platform": {
"php": "7.4"
}
}
}
6 changes: 3 additions & 3 deletions phpunit/otgs-testcase.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ abstract class OTGS_TestCase extends PHPUnit\Framework\TestCase {
/** @var LegacyWPCore */
protected $mocked_wp_core_functions;

public static function setupBeforeClass() {
public static function setupBeforeClass(): void {
$_GET = array();
$_POST = array();
}

public function setUp() {
public function setUp(): void {
FunctionMocker::setUp();
parent::setUp();
WP_Mock::setUp();
$this->stubs = new OTGS_Stubs( $this );
}

public function tearDown() {
public function tearDown(): void {
unset( $this->stubs );
WP_Mock::tearDown();
Mockery::close();
Expand Down

0 comments on commit be25331

Please sign in to comment.