Files
pest/tests/Features/Expect/toHaveAttribute.php
T
nuno maduro cd0e921158 chore: style
2026-07-19 00:42:29 +01:00

22 lines
668 B
PHP

<?php
declare(strict_types=1);
use Pest\Arch\Exceptions\ArchExpectationFailedException;
use Tests\Fixtures\Arch\ToHaveAttribute\Attributes\AsAttribute;
test('class has attribute')
->expect('Tests\\Fixtures\\Arch\\ToHaveAttribute\\HaveAttribute')
->toHaveAttribute(AsAttribute::class);
test('opposite class has attribute')
->throws(ArchExpectationFailedException::class)
->expect('Tests\\Fixtures\\Arch\\ToHaveAttribute\\HaveAttribute')
->not
->toHaveAttribute(AsAttribute::class);
test('class not has attribute')
->expect('Tests\\Fixtures\\Arch\\ToHaveAttribute\\NotHaveAttribute')
->not
->toHaveAttribute(AsAttribute::class);