Files
pest/tests/Features/Expect/toHaveProtectedMethodsBesides.php
T
2026-07-18 01:10:01 +01:00

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);