Valinor/tests/Unit/Definition/Repository/Cache/Compiler/AttributesCompilerTest.php
Romain Canon 396f64a524 feat: initial release
🎉
2021-11-28 18:21:56 +01:00

21 lines
804 B
PHP

<?php
namespace CuyZ\Valinor\Tests\Unit\Definition\Repository\Cache\Compiler;
use CuyZ\Valinor\Definition\Repository\Cache\Compiler\AttributesCompiler;
use CuyZ\Valinor\Definition\Repository\Cache\Compiler\Exception\IncompatibleAttributes;
use CuyZ\Valinor\Tests\Fake\Definition\FakeNonEmptyAttributes;
use PHPUnit\Framework\TestCase;
final class AttributesCompilerTest extends TestCase
{
public function test_incompatible_attributes_class_throws_exception(): void
{
$this->expectException(IncompatibleAttributes::class);
$this->expectExceptionCode(1616925611);
$this->expectExceptionMessage('The Attributes class of type `' . FakeNonEmptyAttributes::class . '` cannot be compiled.');
(new AttributesCompiler())->compile(new FakeNonEmptyAttributes());
}
}