Skip to content

Commit

Permalink
Merge pull request #378 from alleyinteractive/shuffle-shim
Browse files Browse the repository at this point in the history
Use the core shim in the main test case
  • Loading branch information
srtfisher authored Apr 4, 2023
2 parents c766904 + 900e9f3 commit c2fa8d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.10.7 - 2023-04-04

- Fixing issue with core test case shim.

## v0.10.6 - 2023-03-31

### Changed
Expand Down
4 changes: 3 additions & 1 deletion src/mantle/testing/class-test-case.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Mantle\Support\Collection;
use Mantle\Testing\Concerns\Admin_Screen;
use Mantle\Testing\Concerns\Assertions;
use Mantle\Testing\Concerns\Core_Shim;
use Mantle\Testing\Concerns\Deprecations;
use Mantle\Testing\Concerns\Hooks;
use Mantle\Testing\Concerns\Incorrect_Usage;
Expand All @@ -41,6 +42,7 @@
*/
abstract class Test_Case extends BaseTestCase {
use Assertions,
Core_Shim,
Deprecations,
Hooks,
Incorrect_Usage,
Expand Down Expand Up @@ -151,7 +153,7 @@ protected function setUp(): void {

$this->hooks_set_up();

static::clean_up_global_scope();
$this->clean_up_global_scope();

// Boot traits on the test case.
static::get_test_case_traits()
Expand Down
2 changes: 1 addition & 1 deletion src/mantle/testing/concerns/trait-wordpress-state.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trait WordPress_State {
/**
* Cleans the global scope (e.g `$_GET` and `$_POST`).
*/
public static function clean_up_global_scope() {
public function clean_up_global_scope() {
$_GET = [];
$_POST = [];
self::flush_cache();
Expand Down

0 comments on commit c2fa8d7

Please sign in to comment.