diff --git a/core/modules/image/src/Tests/ImageFieldValidateTest.php b/core/modules/image/src/Tests/ImageFieldValidateTest.php index 2e8c910..50d0dc8 100644 --- a/core/modules/image/src/Tests/ImageFieldValidateTest.php +++ b/core/modules/image/src/Tests/ImageFieldValidateTest.php @@ -115,10 +115,10 @@ public function testAJAXValidationMessages() { $this->createImageField($field_name, 'article', array(), array()); $this->drupalGet('node/add/article'); - /** @var \Drupal\file\FileInterface[] $text_files */ $text_files = $this->drupalGetTestFiles('text'); + $text_file = reset($text_files); $edit = array( - 'files[' . $field_name . '_0]' => $this->container->get('file_system')->realpath($text_files[0]->getFileUri()), + 'files[' . $field_name . '_0]' => $this->container->get('file_system')->realpath($text_file->uri), 'title[0][value]' => $this->randomMachineName(), ); $this->drupalPostAjaxForm(NULL, $edit, $field_name . '_0_upload_button');