diff --git a/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php b/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php index c9a3fb1..15dcc6f 100644 --- a/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php +++ b/core/modules/file/src/Tests/FileOnTranslatedEntityTest.php @@ -90,7 +90,7 @@ public function testSyncedFiles() { // Edit the node to upload a file. $edit = array(); $name = 'files[' . $this->fieldName . '_0]'; - $edit[$name] = drupal_realpath($this->drupalGetTestFiles('text')[0]->uri); + $edit[$name] = $this->container->get('file_system')->realpath($this->drupalGetTestFiles('text')[0]->uri); $this->drupalPostForm('node/' . $default_language_node->id() . '/edit', $edit, t('Save')); $first_fid = $this->getLastFileId(); @@ -101,7 +101,7 @@ public function testSyncedFiles() { $edit = array(); $edit['title[0][value]'] = 'Bill Murray'; $name = 'files[' . $this->fieldName . '_0]'; - $edit[$name] = drupal_realpath($this->drupalGetTestFiles('text')[1]->uri); + $edit[$name] = $this->container->get('file_system')->realpath($this->drupalGetTestFiles('text')[1]->uri); $this->drupalPostForm(NULL, $edit, t('Save (this translation)')); // This inspects the HTML after the post of the translation, the file // should be displayed on the original node. @@ -127,7 +127,7 @@ public function testSyncedFiles() { $edit = array(); $edit['title[0][value]'] = 'Scarlett Johansson'; $name = 'files[' . $this->fieldName . '_0]'; - $edit[$name] = drupal_realpath($this->drupalGetTestFiles('text')[2]->uri); + $edit[$name] = $this->container->get('file_system')->realpath($this->drupalGetTestFiles('text')[2]->uri); $this->drupalPostForm(NULL, $edit, t('Save (this translation)')); $third_fid = $this->getLastFileId(); @@ -155,7 +155,7 @@ public function testSyncedFiles() { $edit = array(); $edit['title[0][value]'] = 'David Bowie'; $name = 'files[' . $this->fieldName . '_0]'; - $edit[$name] = drupal_realpath($this->drupalGetTestFiles('text')[3]->uri); + $edit[$name] = $this->container->get('file_system')->realpath($this->drupalGetTestFiles('text')[3]->uri); $this->drupalPostForm(NULL, $edit, t('Save (this translation)')); $replaced_second_fid = $this->getLastFileId();