mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
22 lines
660 B
PHP
22 lines
660 B
PHP
<?php
|
|
|
|
use Pest\Arch\Exceptions\ArchExpectationFailedException;
|
|
|
|
test('missing prefix')
|
|
->throws(ArchExpectationFailedException::class)
|
|
->expect('Tests\\Fixtures\\Arch\\ToHavePrefix\\HasNoPrefix')
|
|
->toHavePrefix('Prefix');
|
|
|
|
test('has prefix')
|
|
->expect('Tests\\Fixtures\\Arch\\ToHavePrefix\\HasPrefix')
|
|
->toHavePrefix('Prefix');
|
|
|
|
test('opposite missing prefix')
|
|
->throws(ArchExpectationFailedException::class)
|
|
->expect('Tests\\Fixtures\\Arch\\ToHavePrefix\\HasPrefix')
|
|
->not->toHavePrefix('Prefix');
|
|
|
|
test('opposite has prefix')
|
|
->expect('Tests\\Fixtures\\Arch\\ToHavePrefix\\HasNoPrefix')
|
|
->not->toHavePrefix('Prefix');
|