Files
pest/tests/Features/Expect/toHaveProtectedMethodsBesides.php

13 lines
413 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->toHaveProtectedMethodsBesides([]);
})->throws(ArchExpectationFailedException::class);