From 694f5484c78bfd6bad097ab54e8c35486b7a7fd8 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Thu, 7 Oct 2021 20:12:09 -0400 Subject: [PATCH] remove wombats and bananas --- tests/phpunit/CRM/Case/BAO/CaseTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/phpunit/CRM/Case/BAO/CaseTest.php b/tests/phpunit/CRM/Case/BAO/CaseTest.php index 066788415c..2cbd43ad93 100644 --- a/tests/phpunit/CRM/Case/BAO/CaseTest.php +++ b/tests/phpunit/CRM/Case/BAO/CaseTest.php @@ -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']); + } } /** -- 2.25.1