29 lines
633 B
PHP
29 lines
633 B
PHP
<?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();
|
|
}
|
|
}
|