Files
Php-Template/tests/Facades/AbstractFacade.php
Ron Rise fa1cc47b44
All checks were successful
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 2m38s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m29s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 3m37s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 3m33s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m55s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 1m4s
chore: update .dockerignore and .gitignore to exclude .idea and .DS_Store
2025-10-15 20:17:53 -04:00

33 lines
821 B
PHP

<?php
declare(strict_types=1);
namespace Siteworxpro\Tests\Facades;
use Siteworxpro\App\Services\Facade;
use Siteworxpro\Tests\Unit;
abstract class AbstractFacade extends Unit
{
abstract protected function getFacadeClass(): string;
abstract protected function getConcrete(): string;
public function testFacadeAccessor(): void
{
/** @var Facade | string $class */
$class = $this->getFacadeClass();
$this->assertTrue(
method_exists($class, 'getFacadeAccessor'),
sprintf('The class %s must implement the method getFacadeAccessor.', $class)
);
$facade = $class::getFacadeRoot();
$this->assertNotNull(
$facade,
sprintf('The facade %s is not properly initialized.', $this->getConcrete())
);
}
}