Files
php-auth/tests/CommandBus/AttributeLocatorTest.php
Ron Rise fc6e493355
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 54s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Failing after 1m4s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 1m14s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 1m10s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 1m19s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Failing after 1m12s
Basics of auth
2026-01-02 15:01:26 -05:00

37 lines
905 B
PHP

<?php
declare(strict_types=1);
namespace Siteworxpro\Tests\CommandBus;
use League\Tactician\Exception\CanNotInvokeHandlerException;
use Siteworxpro\App\CommandBus\AttributeLocator;
use Siteworxpro\Tests\Unit;
class AttributeLocatorTest extends Unit
{
private const array HANDLERS = [
];
/**
* @return void
*/
public function testResolvesFiles(): void
{
$attributeLocator = new AttributeLocator();
foreach (self::HANDLERS as $command => $handler) {
$class = $attributeLocator->getHandlerForCommand($command);
$this->assertInstanceOf($handler, $class);
}
}
public function testThrowsOnCannotResolve(): void
{
$attributeLocator = new AttributeLocator();
$this->expectException(CanNotInvokeHandlerException::class);
$attributeLocator->getHandlerForCommand('NonExistentCommand');
}
}