Improve wp acorn compability
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace AcornPlugin\Tests;
|
||||
|
||||
use Brain\Monkey;
|
||||
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
|
||||
use PHPUnit\Framework\TestCase as PhpUnitTestCase;
|
||||
|
||||
abstract class TestCase extends PhpUnitTestCase
|
||||
{
|
||||
// Bridges Brain\Monkey's Mockery-backed expectations into PHPUnit's
|
||||
// assertion count, so expectation-only tests aren't reported as "risky".
|
||||
use MockeryPHPUnitIntegration;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
Monkey\setUp();
|
||||
}
|
||||
|
||||
protected function tearDown(): void
|
||||
{
|
||||
Monkey\tearDown();
|
||||
parent::tearDown();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user