From 58ab9a3b7023f43818200ef92fab286c6650eef5 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Thu, 29 Jun 2023 13:34:43 -0300 Subject: [PATCH] Stop using deprecated FILE_STATUS_PERMANENT. --- tests/src/Functional/DeleteNodeWithMediaAndFile.php | 2 +- tests/src/Functional/IslandoraFunctionalTestBase.php | 2 +- tests/src/Functional/IslandoraImageFormatterTest.php | 2 +- tests/src/Functional/JsonldTypeAlterReactionTest.php | 2 +- tests/src/Functional/MediaSourceUpdateTest.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/src/Functional/DeleteNodeWithMediaAndFile.php b/tests/src/Functional/DeleteNodeWithMediaAndFile.php index 40e469c5..5ee19b7c 100644 --- a/tests/src/Functional/DeleteNodeWithMediaAndFile.php +++ b/tests/src/Functional/DeleteNodeWithMediaAndFile.php @@ -42,8 +42,8 @@ class DeleteNodeWithMediaAndFile extends IslandoraFunctionalTestBase { 'uri' => "public://test.jpeg", 'filename' => "test.jpeg", 'filemime' => "image/jpeg", - 'status' => FILE_STATUS_PERMANENT, ]); + $file->setPermanent(); $file->save(); $this->drupalGet("node/1/delete"); diff --git a/tests/src/Functional/IslandoraFunctionalTestBase.php b/tests/src/Functional/IslandoraFunctionalTestBase.php index 2e723561..016788d0 100644 --- a/tests/src/Functional/IslandoraFunctionalTestBase.php +++ b/tests/src/Functional/IslandoraFunctionalTestBase.php @@ -438,8 +438,8 @@ EOD; 'uri' => "public://test_file.txt", 'filename' => "test_file.txt", 'filemime' => "text/plain", - 'status' => FILE_STATUS_PERMANENT, ]); + $file->setPermanent(); $file->save(); // Get the source field for the media. diff --git a/tests/src/Functional/IslandoraImageFormatterTest.php b/tests/src/Functional/IslandoraImageFormatterTest.php index 84ea5517..1b40f7a8 100644 --- a/tests/src/Functional/IslandoraImageFormatterTest.php +++ b/tests/src/Functional/IslandoraImageFormatterTest.php @@ -59,8 +59,8 @@ class IslandoraImageFormatterTest extends IslandoraFunctionalTestBase { 'uri' => "public://test.jpeg", 'filename' => "test.jpeg", 'filemime' => "image/jpeg", - 'status' => FILE_STATUS_PERMANENT, ]); + $file->setPermanent(); $file->save(); // Make the media, and associate it with the image and node. diff --git a/tests/src/Functional/JsonldTypeAlterReactionTest.php b/tests/src/Functional/JsonldTypeAlterReactionTest.php index 80a6039c..658244ae 100644 --- a/tests/src/Functional/JsonldTypeAlterReactionTest.php +++ b/tests/src/Functional/JsonldTypeAlterReactionTest.php @@ -30,7 +30,7 @@ class JsonldTypeAlterReactionTest extends JsonldSelfReferenceReactionTest { 'new_storage_type' => 'string', 'label' => 'Typed Predicate', 'field_name' => 'type_predicate', - ], $this->t('Save and continue')); + ], 'Save and continue'); $this->submitForm([], $this->t('Save field settings')); $this->submitForm([], $this->t('Save settings')); $this->assertSession()->responseContains('field_type_predicate'); diff --git a/tests/src/Functional/MediaSourceUpdateTest.php b/tests/src/Functional/MediaSourceUpdateTest.php index 3c97c695..3938e9b4 100644 --- a/tests/src/Functional/MediaSourceUpdateTest.php +++ b/tests/src/Functional/MediaSourceUpdateTest.php @@ -52,8 +52,8 @@ class MediaSourceUpdateTest extends IslandoraFunctionalTestBase { 'uri' => "public://test_file.txt", 'filename' => "test_file.txt", 'filemime' => "text/plain", - 'status' => FILE_STATUS_PERMANENT, ]); + $this->file->setPermanent(); $this->file->save(); // Get the source field for the media.