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
|
@ -49,7 +49,7 @@ class SqlContentEntityStorageSchemaColumnTest extends KernelTestBase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
$this->installEntitySchema('entity_test_rev');
|
||||
|
|
|
@ -36,7 +36,7 @@ class EntityReferenceFileUploadTest extends WebTestBase {
|
|||
/**
|
||||
* Node id.
|
||||
*
|
||||
* @var integer
|
||||
* @var int
|
||||
*/
|
||||
protected $nodeId;
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ class EntityReferenceRelationshipTest extends ViewKernelTestBase {
|
|||
$this->installEntitySchema('entity_test_mul');
|
||||
|
||||
// Create reference from entity_test to entity_test_mul.
|
||||
$this->createEntityReferenceField('entity_test','entity_test','field_test_data','field_test_data','entity_test_mul');
|
||||
$this->createEntityReferenceField('entity_test', 'entity_test', 'field_test_data', 'field_test_data', 'entity_test_mul');
|
||||
|
||||
// Create reference from entity_test_mul to entity_test.
|
||||
$this->createEntityReferenceField('entity_test_mul', 'entity_test_mul', 'field_data_test', 'field_data_test', 'entity_test');
|
||||
|
|
|
@ -36,7 +36,7 @@ class SelectionTest extends WebTestBase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
// Create nodes.
|
||||
|
|
|
@ -80,8 +80,8 @@ class FieldDataCountTest extends FieldUnitTestBase {
|
|||
// Create 12 entities to ensure that the purging works as expected.
|
||||
for ($i=0; $i < 12; $i++) {
|
||||
$entity = entity_create('entity_test');
|
||||
$entity->field_int[] = mt_rand(1,99);
|
||||
$entity->field_int[] = mt_rand(1,99);
|
||||
$entity->field_int[] = mt_rand(1, 99);
|
||||
$entity->field_int[] = mt_rand(1, 99);
|
||||
$entity->name[] = $this->randomMachineName();
|
||||
$entity->save();
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class FieldDefaultValueCallbackTest extends WebTestBase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
$this->fieldName = 'field_test';
|
||||
|
|
|
@ -39,22 +39,22 @@ class MigrateFieldTest extends MigrateDrupal6TestBase {
|
|||
|
||||
// Integer field.
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_two');
|
||||
$this->assertIdentical("integer", $field_storage->getType(), t('Field type is @fieldtype. It should be integer.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("integer", $field_storage->getType(), t('Field type is @fieldtype. It should be integer.', array('@fieldtype' => $field_storage->getType())));
|
||||
|
||||
// Float field.
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_three');
|
||||
$this->assertIdentical("decimal", $field_storage->getType(), t('Field type is @fieldtype. It should be decimal.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("decimal", $field_storage->getType(), t('Field type is @fieldtype. It should be decimal.', array('@fieldtype' => $field_storage->getType())));
|
||||
|
||||
// Link field.
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_link');
|
||||
$this->assertIdentical("link", $field_storage->getType(), t('Field type is @fieldtype. It should be link.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("link", $field_storage->getType(), t('Field type is @fieldtype. It should be link.', array('@fieldtype' => $field_storage->getType())));
|
||||
|
||||
// File field.
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_filefield');
|
||||
$this->assertIdentical("file", $field_storage->getType(), t('Field type is @fieldtype. It should be file.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("file", $field_storage->getType(), t('Field type is @fieldtype. It should be file.', array('@fieldtype' => $field_storage->getType())));
|
||||
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_imagefield');
|
||||
$this->assertIdentical("image", $field_storage->getType(), t('Field type is @fieldtype. It should be image.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("image", $field_storage->getType(), t('Field type is @fieldtype. It should be image.', array('@fieldtype' => $field_storage->getType())));
|
||||
$settings = $field_storage->getSettings();
|
||||
$this->assertIdentical('file', $settings['target_type']);
|
||||
$this->assertIdentical('public', $settings['uri_scheme']);
|
||||
|
@ -62,15 +62,15 @@ class MigrateFieldTest extends MigrateDrupal6TestBase {
|
|||
|
||||
// Phone field.
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_phone');
|
||||
$this->assertIdentical("telephone", $field_storage->getType(), t('Field type is @fieldtype. It should be telephone.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("telephone", $field_storage->getType(), t('Field type is @fieldtype. It should be telephone.', array('@fieldtype' => $field_storage->getType())));
|
||||
|
||||
// Date field.
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_datetime');
|
||||
$this->assertIdentical("datetime", $field_storage->getType(), t('Field type is @fieldtype. It should be datetime.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("datetime", $field_storage->getType(), t('Field type is @fieldtype. It should be datetime.', array('@fieldtype' => $field_storage->getType())));
|
||||
|
||||
// Decimal field with radio buttons.
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_decimal_radio_buttons');
|
||||
$this->assertIdentical("list_float", $field_storage->getType(), t('Field type is @fieldtype. It should be list_float.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("list_float", $field_storage->getType(), t('Field type is @fieldtype. It should be list_float.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertNotNull($field_storage->getSetting('allowed_values')['1.2'], t('First allowed value key is set to 1.2'));
|
||||
$this->assertNotNull($field_storage->getSetting('allowed_values')['2.1'], t('Second allowed value key is set to 2.1'));
|
||||
$this->assertIdentical('1.2', $field_storage->getSetting('allowed_values')['1.2'], t('First allowed value is set to 1.2'));
|
||||
|
@ -78,11 +78,11 @@ class MigrateFieldTest extends MigrateDrupal6TestBase {
|
|||
|
||||
// Float field with a single checkbox.
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_float_single_checkbox');
|
||||
$this->assertIdentical("boolean", $field_storage->getType(), t('Field type is @fieldtype. It should be boolean.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("boolean", $field_storage->getType(), t('Field type is @fieldtype. It should be boolean.', array('@fieldtype' => $field_storage->getType())));
|
||||
|
||||
// Integer field with a select list.
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_integer_selectlist');
|
||||
$this->assertIdentical("list_integer", $field_storage->getType(), t('Field type is @fieldtype. It should be list_integer.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("list_integer", $field_storage->getType(), t('Field type is @fieldtype. It should be list_integer.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertNotNull($field_storage->getSetting('allowed_values')['1234'], t('First allowed value key is set to 1234'));
|
||||
$this->assertNotNull($field_storage->getSetting('allowed_values')['2341'], t('Second allowed value key is set to 2341'));
|
||||
$this->assertNotNull($field_storage->getSetting('allowed_values')['3412'], t('Third allowed value key is set to 3412'));
|
||||
|
@ -94,7 +94,7 @@ class MigrateFieldTest extends MigrateDrupal6TestBase {
|
|||
|
||||
// Text field with a single checkbox.
|
||||
$field_storage = FieldStorageConfig::load('node.field_test_text_single_checkbox');
|
||||
$this->assertIdentical("boolean", $field_storage->getType(), t('Field type is @fieldtype. It should be boolean.', array('@fieldtype' => $field_storage->getType())));
|
||||
$this->assertIdentical("boolean", $field_storage->getType(), t('Field type is @fieldtype. It should be boolean.', array('@fieldtype' => $field_storage->getType())));
|
||||
|
||||
// Validate that the source count and processed count match up.
|
||||
/** @var \Drupal\migrate\Entity\MigrationInterface $migration */
|
||||
|
|
|
@ -53,9 +53,9 @@ class MigrateFieldTest extends MigrateDrupal7TestBase {
|
|||
* The entity ID in the form ENTITY_TYPE.FIELD_NAME.
|
||||
* @param string $expected_type
|
||||
* The expected field type.
|
||||
* @param boolean $expected_translatable
|
||||
* @param bool $expected_translatable
|
||||
* Whether or not the field is expected to be translatable.
|
||||
* @param integer $expected_cardinality
|
||||
* @param int $expected_cardinality
|
||||
* The expected cardinality of the field.
|
||||
*/
|
||||
protected function assertEntity($id, $expected_type, $expected_translatable, $expected_cardinality) {
|
||||
|
|
|
@ -371,8 +371,8 @@ class NumberFieldTest extends WebTestBase {
|
|||
$decimal_separators = array('.', ',');
|
||||
$prefix = $this->randomMachineName();
|
||||
$suffix = $this->randomMachineName();
|
||||
$random_float = rand(0,pow(10,6));
|
||||
$random_integer = rand(0, pow(10,6));
|
||||
$random_float = rand(0, pow(10, 6));
|
||||
$random_integer = rand(0, pow(10, 6));
|
||||
|
||||
// Create a content type containing float and integer fields.
|
||||
$this->drupalCreateContentType(array('type' => $type));
|
||||
|
|
|
@ -145,7 +145,7 @@ class TimestampFormatterTest extends KernelTestBase {
|
|||
protected function testTimestampAgoFormatter() {
|
||||
$data = [];
|
||||
|
||||
foreach (array(1,2,3,4,5,6) as $granularity) {
|
||||
foreach (array(1, 2, 3, 4, 5, 6) as $granularity) {
|
||||
$data[] = [
|
||||
'future_format' => '@interval hence',
|
||||
'past_format' => '@interval ago',
|
||||
|
|
Reference in a new issue