You've already forked php-auth
generated from siteworxpro/Php-Template
Initial commit
This commit is contained in:
32
tests/Facades/AbstractFacade.php
Normal file
32
tests/Facades/AbstractFacade.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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())
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user