assertNotEmpty($loop); $return_data = ['errors' => ['missing field', 'invalid template']]; $message = 'previous success'; $debug_data = []; // Run the production loop body using the existing logging recorder. foreach ($return_data['errors'] as $error) { eval($loop[1]); } $this->assertSame([ 'NOTE: Template Import Error!. Message: missing field', 'NOTE: Template Import Error!. Message: invalid template', ], CactiStubs::$log); } }