You've already forked Php-Template
Some checks failed
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Has started running
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Has been cancelled
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Has been cancelled
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Has been cancelled
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Has been cancelled
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Has been cancelled
34 lines
751 B
PHP
34 lines
751 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Siteworxpro\Tests;
|
|
|
|
use Illuminate\Container\Container;
|
|
use PHPUnit\Framework\TestCase;
|
|
use Siteworx\Config\Config as SWConfig;
|
|
use Siteworxpro\App\Services\Facade;
|
|
use Siteworxpro\App\Services\Facades\Config;
|
|
|
|
abstract class Unit extends TestCase
|
|
{
|
|
/**
|
|
* @throws \ReflectionException
|
|
*/
|
|
protected function setUp(): void
|
|
{
|
|
$container = new Container();
|
|
Facade::setFacadeContainer($container);
|
|
|
|
$container->bind(SWConfig::class, function () {
|
|
return SWConfig::load(__DIR__ . '/../config.php');
|
|
});
|
|
}
|
|
|
|
protected function tearDown(): void
|
|
{
|
|
Config::clearResolvedInstances();
|
|
Facade::setFacadeContainer(null);
|
|
}
|
|
}
|