Files
Php-Template/tests/Unit.php
Ron Rise 5a91c35269
All checks were successful
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m0s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 2m55s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 3m9s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 3m0s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 3m13s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 2m37s
chore: add log level configuration and enhance logger tests
2025-11-16 11:37:48 -05:00

36 lines
790 B
PHP

<?php
declare(strict_types=1);
namespace Siteworxpro\Tests;
use Illuminate\Container\Container;
use Mockery;
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);
Mockery::close();
}
}