not->toHavePrivateMethodsBesides(['privateMethod']); }); test('failures', function (): void { expect(UserController::class)->not->toHavePrivateMethods(); })->throws(ArchExpectationFailedException::class);