Browse Source

fixed test

pull/1017/head
ajstanley 8 months ago
parent
commit
108fa6f9a9
  1. 4
      src/IslandoraUtils.php
  2. 2
      tests/src/Functional/DeleteMediaTest.php

4
src/IslandoraUtils.php

@ -825,8 +825,8 @@ class IslandoraUtils {
$file_storage->delete($delete_files); $file_storage->delete($delete_files);
} }
$results['deleted'] = $this->formatPlural( $results['deleted'] = $this->formatPlural(
count($delete_media), 'the media with the id @media has been deleted.', count($delete_media), 'The media with the id @media has been deleted.',
'the medias with the ids @media have been deleted.', 'The medias with the ids @media have been deleted.',
['@media' => implode(", ", array_keys($delete_media))], ['@media' => implode(", ", array_keys($delete_media))],
); );
if ($inaccessible_entities) { if ($inaccessible_entities) {

2
tests/src/Functional/DeleteMediaTest.php

@ -93,7 +93,7 @@ class DeleteMediaTest extends IslandoraFunctionalTestBase {
$this->assertSession()->pageTextContains('Are you sure you want to delete this media and associated files?'); $this->assertSession()->pageTextContains('Are you sure you want to delete this media and associated files?');
$page->pressButton('Delete'); $page->pressButton('Delete');
// Should assert that a media and file were deleted. // Should assert that a media and file were deleted.
$this->assertSession()->pageTextContains('Deleted 2 items.'); $this->assertSession()->pageTextContains("The media with the id $mid has been deleted");
// Attempt to reload the entities. // Attempt to reload the entities.
// Both media and file should be gone. // Both media and file should be gone.

Loading…
Cancel
Save