Update to Drupal 8.1.2. For more information, see https://www.drupal.org/project/drupal/releases/8.1.2
This commit is contained in:
parent
9eae24d844
commit
28556d630e
1322 changed files with 6699 additions and 2064 deletions
|
@ -19,7 +19,7 @@ class ImageCacheActions extends ProcessPluginBase {
|
|||
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
|
||||
$effects = [];
|
||||
|
||||
foreach($row->getSourceProperty('actions') as $action) {
|
||||
foreach ($row->getSourceProperty('actions') as $action) {
|
||||
$id = preg_replace('/^imagecache/', 'image', $action['action']);
|
||||
|
||||
if ($id === 'image_crop') {
|
||||
|
|
|
@ -54,7 +54,7 @@ class ImageCachePreset extends DrupalSqlBase {
|
|||
->condition('presetid', $row->getSourceProperty('presetid'))
|
||||
->execute();
|
||||
|
||||
foreach($results as $key => $result) {
|
||||
foreach ($results as $key => $result) {
|
||||
$actions[$key] = $result;
|
||||
$actions[$key]['data'] = unserialize($result['data']);
|
||||
}
|
||||
|
|
|
@ -48,4 +48,5 @@ class FileMoveTest extends WebTestBase {
|
|||
// Check if derivative image has been flushed.
|
||||
$this->assertFalse(file_exists($derivative_uri), 'Make sure derivative image has been flushed.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class ImageDimensionsTest extends WebTestBase {
|
|||
/** @var $style \Drupal\image\ImageStyleInterface */
|
||||
$style = ImageStyle::create(array('name' => 'test', 'label' => 'Test'));
|
||||
$style->save();
|
||||
$generated_uri = 'public://styles/test/public/'. \Drupal::service('file_system')->basename($original_uri);
|
||||
$generated_uri = 'public://styles/test/public/' . \Drupal::service('file_system')->basename($original_uri);
|
||||
$url = file_url_transform_relative($style->buildUrl($original_uri));
|
||||
|
||||
$variables = array(
|
||||
|
@ -248,7 +248,7 @@ class ImageDimensionsTest extends WebTestBase {
|
|||
'#height' => 20,
|
||||
];
|
||||
// PNG original image. Should be resized to 100x100.
|
||||
$generated_uri = 'public://styles/test_uri/public/'. \Drupal::service('file_system')->basename($original_uri);
|
||||
$generated_uri = 'public://styles/test_uri/public/' . \Drupal::service('file_system')->basename($original_uri);
|
||||
$url = file_url_transform_relative($style->buildUrl($original_uri));
|
||||
$this->assertEqual($this->getImageTag($variables), '<img src="' . $url . '" width="100" height="100" alt="" class="image-style-test-uri" />');
|
||||
$this->assertFalse(file_exists($generated_uri), 'Generated file does not exist.');
|
||||
|
@ -261,7 +261,7 @@ class ImageDimensionsTest extends WebTestBase {
|
|||
// GIF original image. Should be resized to 50x50.
|
||||
$file = $files[1];
|
||||
$original_uri = file_unmanaged_copy($file->uri, 'public://', FILE_EXISTS_RENAME);
|
||||
$generated_uri = 'public://styles/test_uri/public/'. \Drupal::service('file_system')->basename($original_uri);
|
||||
$generated_uri = 'public://styles/test_uri/public/' . \Drupal::service('file_system')->basename($original_uri);
|
||||
$url = file_url_transform_relative($style->buildUrl($original_uri));
|
||||
$variables['#uri'] = $original_uri;
|
||||
$this->assertEqual($this->getImageTag($variables), '<img src="' . $url . '" width="50" height="50" alt="" class="image-style-test-uri" />');
|
||||
|
|
|
@ -101,4 +101,5 @@ class ImageFieldValidateTest extends ImageFieldTestBase {
|
|||
$this->assertNoText(t('Alternative text field is required.'));
|
||||
$this->assertNoText(t('Title field is required.'));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -106,4 +106,5 @@ class ImageStyleFlushTest extends ImageFieldTestBase {
|
|||
// Post flush, expected no image in the 'private' wrapper.
|
||||
$this->assertEqual($this->getImageCount($style, 'private'), 0, format_string('Image style %style flushed correctly for %wrapper wrapper.', array('%style' => $style->label(), '%wrapper' => 'private')));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ class ImageStylesPathAndUrlTest extends WebTestBase {
|
|||
// make sure that access is denied.
|
||||
$file_noaccess = array_shift($files);
|
||||
$original_uri_noaccess = file_unmanaged_copy($file_noaccess->uri, $scheme . '://', FILE_EXISTS_RENAME);
|
||||
$generated_uri_noaccess = $scheme . '://styles/' . $this->style->id() . '/' . $scheme . '/'. drupal_basename($original_uri_noaccess);
|
||||
$generated_uri_noaccess = $scheme . '://styles/' . $this->style->id() . '/' . $scheme . '/' . drupal_basename($original_uri_noaccess);
|
||||
$this->assertFalse(file_exists($generated_uri_noaccess), 'Generated file does not exist.');
|
||||
$generate_url_noaccess = $this->style->buildUrl($original_uri_noaccess);
|
||||
|
||||
|
@ -249,7 +249,7 @@ class ImageStylesPathAndUrlTest extends WebTestBase {
|
|||
|
||||
// Check that requesting a nonexistent image does not create any new
|
||||
// directories in the file system.
|
||||
$directory = $scheme . '://styles/' . $this->style->id() . '/' . $scheme . '/' . $this->randomMachineName();
|
||||
$directory = $scheme . '://styles/' . $this->style->id() . '/' . $scheme . '/' . $this->randomMachineName();
|
||||
$this->drupalGet(file_create_url($directory . '/' . $this->randomString()));
|
||||
$this->assertFalse(file_exists($directory), 'New directory was not created in the filesystem when requesting an unauthorized image.');
|
||||
}
|
||||
|
|
|
@ -217,4 +217,5 @@ class ImageThemeFunctionTest extends WebTestBase {
|
|||
$elements = $this->xpath('//img[contains(@class, class) and contains(@alt, :alt)]', array(":class" => "image-with-attribute-alt", ":alt" => "Attribute alt"));
|
||||
$this->assertEqual(count($elements), 1, 'Attribute alt overrides alt property if both set.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue