remove wombats and bananas
authordemeritcowboy <demeritcowboy@hotmail.com>
Fri, 8 Oct 2021 00:12:09 +0000 (20:12 -0400)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Fri, 8 Oct 2021 00:12:09 +0000 (20:12 -0400)
tests/phpunit/CRM/Case/BAO/CaseTest.php

index 066788415cb3a4613a2a6a4cbb71514a252662e8..2cbd43ad934c6937045dbf53888531c526b9508b 100644 (file)
@@ -328,6 +328,14 @@ class CRM_Case_BAO_CaseTest extends CiviUnitTestCase {
     }
 
     $this->assertEquals(2, $totalEntityFiles, 'Two files should be attached with new case.');
+
+    // delete original files
+    unlink($fileA['values']['uri']);
+    unlink($fileB['values']['uri']);
+    // find out the hashed name of the attached file
+    foreach (CRM_Core_BAO_File::getEntityFile($customGroup['table_name'], $newCase[0]) as $file) {
+      unlink($file['fullPath']);
+    }
   }
 
   /**