Files
pest/tests/Features/Expect/toHaveProtectedMethodsBesides.php
2024-09-04 11:18:41 +01:00

13 lines
404 B
PHP

<?php
use Pest\Arch\Exceptions\ArchExpectationFailedException;
use Tests\Fixtures\Arch\ToHavePublicMethodsBesides\UserController;
test('pass', function () {
expect(UserController::class)->not->toHaveProtectedMethodsBesides(['protectedMethod']);
});
test('failures', function () {
expect(UserController::class)->not->toHaveProtectedMethods();
})->throws(ArchExpectationFailedException::class);