Update to Drupal 8.0.2. For more information, see https://www.drupal.org/drupal-8.0.2-release-notes
This commit is contained in:
parent
1a0e9d9fac
commit
a6b049dd05
538 changed files with 5247 additions and 1594 deletions
|
@ -96,11 +96,11 @@ function image_theme() {
|
|||
'image_style' => array(
|
||||
// HTML 4 and XHTML 1.0 always require an alt attribute. The HTML 5 draft
|
||||
// allows the alt attribute to be omitted in some cases. Therefore,
|
||||
// default the alt attribute to an empty string, but allow code calling
|
||||
// _theme('image_style') to pass explicit NULL for it to be omitted.
|
||||
// default the alt attribute to an empty string, but allow code using
|
||||
// '#theme' => 'image_style' to pass explicit NULL for it to be omitted.
|
||||
// Usually, neither omission nor an empty string satisfies accessibility
|
||||
// requirements, so it is strongly encouraged for code calling
|
||||
// _theme('image_style') to pass a meaningful value for the alt variable.
|
||||
// requirements, so it is strongly encouraged for code using '#theme' =>
|
||||
// 'image_style' to pass a meaningful value for the alt variable.
|
||||
// - http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.8
|
||||
// - http://www.w3.org/TR/xhtml1/dtds.html
|
||||
// - http://dev.w3.org/html5/spec/Overview.html#alt
|
||||
|
@ -260,8 +260,8 @@ function image_style_options($include_empty = TRUE) {
|
|||
* attribute to be omitted in some cases. Therefore, this variable defaults
|
||||
* to an empty string, but can be set to NULL for the attribute to be
|
||||
* omitted. Usually, neither omission nor an empty string satisfies
|
||||
* accessibility requirements, so it is strongly encouraged for code calling
|
||||
* _theme('image_style') to pass a meaningful value for this variable.
|
||||
* accessibility requirements, so it is strongly encouraged for code using
|
||||
* '#theme' => 'image_style' to pass a meaningful value for this variable.
|
||||
* - http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.8
|
||||
* - http://www.w3.org/TR/xhtml1/dtds.html
|
||||
* - http://dev.w3.org/html5/spec/Overview.html#alt
|
||||
|
|
|
@ -142,7 +142,7 @@ class ImageStyleDownloadController extends FileDownloadController {
|
|||
$path_info = pathinfo($image_uri);
|
||||
$converted_image_uri = $path_info['dirname'] . DIRECTORY_SEPARATOR . $path_info['filename'];
|
||||
if (!file_exists($converted_image_uri)) {
|
||||
$this->logger->notice('Source image at %source_image_path not found while trying to generate derivative image at %derivative_path.', array('%source_image_path' => $image_uri, '%derivative_path' => $derivative_uri));
|
||||
$this->logger->notice('Source image at %source_image_path not found while trying to generate derivative image at %derivative_path.', array('%source_image_path' => $image_uri, '%derivative_path' => $derivative_uri));
|
||||
return new Response($this->t('Error generating image, missing source file.'), 404);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
namespace Drupal\image\Tests;
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
use Drupal\Core\Entity\Entity\EntityViewDisplay;
|
||||
use Drupal\file\Entity\File;
|
||||
|
||||
/**
|
||||
|
@ -162,6 +163,13 @@ class ImageFieldDefaultImagesTest extends ImageFieldTestBase {
|
|||
)
|
||||
);
|
||||
|
||||
// Also check that the field renders without warnings when the label is
|
||||
// hidden.
|
||||
EntityViewDisplay::load('node.article.default')
|
||||
->setComponent($field_name, array('label' => 'hidden', 'type' => 'image'))
|
||||
->save();
|
||||
$this->drupalGet('node/' . $article->id());
|
||||
|
||||
// Confirm that the image default is shown for a new page node.
|
||||
$page = $this->drupalCreateNode(array('type' => 'page'));
|
||||
$page_built = $this->drupalBuildEntityView($page);
|
||||
|
@ -326,7 +334,7 @@ class ImageFieldDefaultImagesTest extends ImageFieldTestBase {
|
|||
// The non-existent default image should not be saved.
|
||||
$this->assertNull($settings['default_image']['uuid']);
|
||||
|
||||
$field = entity_create('field_config', array(
|
||||
$field = entity_create('field_config', array(
|
||||
'field_storage' => $field_storage,
|
||||
'bundle' => 'page',
|
||||
'label' => $this->randomMachineName(),
|
||||
|
|
|
@ -136,7 +136,7 @@ class ImageFieldDisplayTest extends ImageFieldTestBase {
|
|||
// Only verify HTTP headers when using private scheme and the headers are
|
||||
// sent by Drupal.
|
||||
$this->assertEqual($this->drupalGetHeader('Content-Type'), 'image/png', 'Content-Type header was sent.');
|
||||
$this->assertTrue(strstr($this->drupalGetHeader('Cache-Control'),'private') !== FALSE, 'Cache-Control header was sent.');
|
||||
$this->assertTrue(strstr($this->drupalGetHeader('Cache-Control'), 'private') !== FALSE, 'Cache-Control header was sent.');
|
||||
|
||||
// Log out and try to access the file.
|
||||
$this->drupalLogout();
|
||||
|
|
|
@ -72,7 +72,7 @@ class ImageFieldValidateTest extends ImageFieldTestBase {
|
|||
// Look for form-required for the alt text.
|
||||
$elements = $this->xpath('//label[@for="edit-' . $field_name . '-0-alt" and @class="js-form-required form-required"]/following-sibling::input[@id="edit-' . $field_name . '-0-alt"]');
|
||||
|
||||
$this->assertTrue(isset($elements[0]),'Required marker is shown for the required alt text.');
|
||||
$this->assertTrue(isset($elements[0]), 'Required marker is shown for the required alt text.');
|
||||
|
||||
$elements = $this->xpath('//label[@for="edit-' . $field_name . '-0-title" and @class="js-form-required form-required"]/following-sibling::input[@id="edit-' . $field_name . '-0-title"]');
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ class MigrateImageCacheTest extends MigrateDrupal6TestBase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->installConfig(['image']);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class MigrateImageSettingsTest extends MigrateDrupal7TestBase {
|
|||
// These settings are not recommended...
|
||||
$this->assertTrue($config->get('allow_insecure_derivatives'));
|
||||
$this->assertTrue($config->get('suppress_itok_output'));
|
||||
$this->assertIdentical("core/modules/image/testsample.png",$config->get('preview_image'));
|
||||
$this->assertIdentical("core/modules/image/testsample.png", $config->get('preview_image'));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ class ImageStyleTest extends UnitTestCase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
$this->entityTypeId = $this->randomMachineName();
|
||||
$this->provider = $this->randomMachineName();
|
||||
$this->entityType = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
|
||||
|
|
|
@ -47,7 +47,7 @@ class DenyPrivateImageStyleDownloadTest extends UnitTestCase {
|
|||
*/
|
||||
protected $routeMatch;
|
||||
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
$this->routeMatch = $this->getMock('Drupal\Core\Routing\RouteMatchInterface');
|
||||
$this->policy = new DenyPrivateImageStyleDownload($this->routeMatch);
|
||||
$this->response = new Response();
|
||||
|
|
|
@ -45,7 +45,7 @@ class MigrateImageStylesTest extends MigrateSqlSourceTestCase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
foreach ($this->expectedResults as $k => $row) {
|
||||
foreach (array('isid', 'name', 'label') as $field) {
|
||||
$this->databaseContents['image_styles'][$k][$field] = $row[$field];
|
||||
|
|
Reference in a new issue