You've already forked Php-Template
feat: add event dispatcher destructor and implement subscriber interface with tests
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 3m58s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Failing after 3m48s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 4m11s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 4m23s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 4m18s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 3m0s
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 3m58s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Failing after 3m48s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 4m11s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 4m23s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 4m18s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 3m0s
This commit is contained in:
@@ -13,13 +13,25 @@ use Siteworxpro\App\Services\Facades\Config;
|
||||
|
||||
abstract class Unit extends TestCase
|
||||
{
|
||||
protected function getContainer(): Container
|
||||
{
|
||||
$container = Facade::getFacadeContainer();
|
||||
if ($container === null) {
|
||||
$container = new Container();
|
||||
Facade::setFacadeContainer($container);
|
||||
|
||||
return $container;
|
||||
}
|
||||
|
||||
return $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
$container = new Container();
|
||||
Facade::setFacadeContainer($container);
|
||||
$container = $this->getContainer();
|
||||
|
||||
$container->bind(SWConfig::class, function () {
|
||||
return SWConfig::load(__DIR__ . '/../config.php');
|
||||
|
||||
Reference in New Issue
Block a user