not->toHaveProtectedMethodsBesides(['protectedMethod']); }); test('failures', function () { expect(UserController::class)->not->toHaveProtectedMethods(); })->throws(ArchExpectationFailedException::class);