mirror of
https://github.com/flarum/core.git
synced 2025-08-13 03:44:32 +02:00
Improved foundational backend unit tests (#1405)
* part one of adding tests, updating core
* Apply fixes from StyleCI
[ci skip] [skip ci]
* we need xdebug for code coverage, and hhvm was already removed
* forgot about the sidecar for mysql completely 🤦
* gitignore removed this installed json we need to fake that we have extensions
* using reguarded closure
This commit is contained in:
@@ -11,20 +11,21 @@
|
||||
|
||||
namespace Flarum\Tests\Test;
|
||||
|
||||
use Mockery;
|
||||
use PHPUnit\Framework\TestCase as Test;
|
||||
|
||||
abstract class TestCase extends Test
|
||||
{
|
||||
use Concerns\CreatesForum,
|
||||
Concerns\MakesApiRequests;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
Mockery::close();
|
||||
|
||||
$this->refreshApplication();
|
||||
$this->init();
|
||||
}
|
||||
|
||||
protected function init()
|
||||
{
|
||||
// To be overloaded by children - saves having to do setUp/mockery::close every time
|
||||
// .. allows implementation by children without the need to call the parent.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user