Mercurial > hg > isophonics-drupal-site
diff core/modules/image/tests/src/Functional/ImageAdminStylesTest.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line diff
--- a/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php Thu May 09 15:33:08 2019 +0100 @@ -2,6 +2,7 @@ namespace Drupal\Tests\image\Functional; +use Drupal\Core\Url; use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\image\Entity\ImageStyle; @@ -33,7 +34,7 @@ if (!isset($file_path)) { $files = $this->drupalGetTestFiles('image'); $file = reset($files); - $file_path = file_unmanaged_copy($file->uri); + $file_path = \Drupal::service('file_system')->copy($file->uri, 'public://'); } return $style->buildUrl($file_path) ? $file_path : FALSE; @@ -141,7 +142,7 @@ $this->assertEqual('bar', $style->getThirdPartySetting('image_module_test', 'foo'), 'Third party settings were added to the image style.'); // Ensure that the image style URI matches our expected path. - $style_uri_path = $style->url(); + $style_uri_path = $style->toUrl()->toString(); $this->assertTrue(strpos($style_uri_path, $style_path) !== FALSE, 'The image style URI is correct.'); // Confirm that all effects on the image style have settings that match @@ -291,7 +292,7 @@ // Confirm that the empty text is correct on the image styles page. $this->drupalGet($admin_path); $this->assertRaw(t('There are currently no styles. <a href=":url">Add a new one</a>.', [ - ':url' => \Drupal::url('image.style_add'), + ':url' => Url::fromRoute('image.style_add')->toString(), ])); }