mirror of
https://github.com/pestphp/pest.git
synced 2026-07-22 17:40:03 +02:00
20 lines
642 B
PHP
20 lines
642 B
PHP
<?php
|
|
|
|
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);
|