Preview:
@isTest
    static void testProcessCasesSuccess() {
        List<RecordType> recordTypes2 = [SELECT Id FROM RecordType WHERE SObjectType = 'Case' AND DeveloperName IN ('Reclamacao', 'ProcessoLogistico')];
        List<Case> cases = [SELECT Id, Status, CreatedDate, RecordTypeId FROM Case WHERE RecordTypeId IN :recordTypes2];
        for(Case c : cases) {
            Test.setCreatedDate(c.Id, DateTime.newInstance(2023,12,12));
            c = [SELECT Id, CreatedDate, RecordType.Name, status, StatusDayCount__c FROM Case WHERE Id = :c.Id];
        }
        
        Test.startTest();
        AutoCloseCases.processCases();
        Test.stopTest();
    }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter