mirror of
https://github.com/pestphp/pest.git
synced 2026-07-21 17:10:03 +02:00
13 lines
416 B
PHP
13 lines
416 B
PHP
<?php
|
|
|
|
use Pest\Arch\Exceptions\ArchExpectationFailedException;
|
|
use Tests\Fixtures\Arch\ToHavePublicMethodsBesides\UserController;
|
|
|
|
test('pass', function (): void {
|
|
expect(UserController::class)->not->toHaveProtectedMethodsBesides(['protectedMethod']);
|
|
});
|
|
|
|
test('failures', function (): void {
|
|
expect(UserController::class)->not->toHaveProtectedMethods();
|
|
})->throws(ArchExpectationFailedException::class);
|