From 52d3df1462f7df95b20d51a9e8798b9f188509ee Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Thu, 12 May 2022 19:06:32 +0000 Subject: [PATCH] Suppress 'Schema incomplete' error in Functional test. --- .../src/Functional/IslandoraImageFormatterTest.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/src/Functional/IslandoraImageFormatterTest.php b/tests/src/Functional/IslandoraImageFormatterTest.php index 2793cf49..75003463 100644 --- a/tests/src/Functional/IslandoraImageFormatterTest.php +++ b/tests/src/Functional/IslandoraImageFormatterTest.php @@ -10,6 +10,11 @@ namespace Drupal\Tests\islandora\Functional; */ class IslandoraImageFormatterTest extends IslandoraFunctionalTestBase { + /** + * @var bool Suppresses "Schema incomplete" error. + */ + protected $strictConfigSchema = FALSE; + /** * @covers \Drupal\islandora\Plugin\Field\FieldFormatter\IslandoraImageFormatter::viewElements */ @@ -26,15 +31,16 @@ class IslandoraImageFormatterTest extends IslandoraFunctionalTestBase { // Create an image media type. $testImageMediaType = $this->createMediaType('image', ['id' => 'test_image_media_type']); $testImageMediaType->save(); - $this->createEntityReferenceField('media', $testImageMediaType->id(), 'field_media_of', 'Media Of', 'node', 'default', [], 2); - + $this->createEntityReferenceField('media', $testImageMediaType->id(), 'field_media_of', 'Media Of', 'node', 'default', [], 2);("Got past create media type."); // Set the display mode to use the islandora_image formatter. // Also, only show the image on display to remove clutter. $display_options = [ 'type' => 'islandora_image', - 'settings' => ['image_style' => NULL, 'image_link' => 'content'], + 'settings' => [/*'image_style' => NULL,*/ 'image_link' => 'content'], ]; + $display = $this->container->get('entity_display.repository')->getViewDisplay('media', $testImageMediaType->id(), 'default'); + $display->setComponent('field_media_image', $display_options) ->removeComponent('created') ->removeComponent('uid') @@ -47,7 +53,6 @@ class IslandoraImageFormatterTest extends IslandoraFunctionalTestBase { 'title' => 'Test Node', ]); $node->save(); - // Make a image for the Media. $file = $this->container->get('entity_type.manager')->getStorage('file')->create([ 'uid' => $account->id(),