Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -18,6 +18,6 @@ function entity_serialization_test_entity_field_access_alter(array &$grants, arr
|
|||
// Override default access control from UserAccessControlHandler to allow
|
||||
// access to 'pass' field for the test user.
|
||||
if ($context['field_definition']->getName() == 'pass' && $context['account']->getUsername() == 'serialization_test_user') {
|
||||
$grants[':default'] = AccessResult::allowed()->inheritCacheability($grants[':default'])->cacheUntilEntityChanges($context['items']->getEntity());
|
||||
$grants[':default'] = AccessResult::allowed()->inheritCacheability($grants[':default'])->addCacheableDependency($context['items']->getEntity());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\serialization_test\SerializationTestEncoder.
|
||||
*/
|
||||
|
||||
namespace Drupal\serialization_test;
|
||||
|
||||
use Symfony\Component\Serializer\Encoder\EncoderInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\serialization_test\SerializationTestNormalizer.
|
||||
*/
|
||||
|
||||
namespace Drupal\serialization_test;
|
||||
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\Encoder\JsonEncoderTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\Encoder;
|
||||
|
||||
use Drupal\serialization\Encoder\JsonEncoder;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\Encoder\XmlEncoderTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\Encoder;
|
||||
|
||||
use Drupal\serialization\Encoder\XmlEncoder;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\EntityResolver\ChainEntityResolverTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\EntityResolver;
|
||||
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\EntityResolver\UuidResolverTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\EntityResolver;
|
||||
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\Normalizer\ConfigEntityNormalizerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\Normalizer;
|
||||
|
||||
use Drupal\serialization\Normalizer\ConfigEntityNormalizer;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\Normalizer\ContentEntityNormalizerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\Normalizer;
|
||||
|
||||
use Drupal\serialization\Normalizer\ContentEntityNormalizer;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\Normalizer\EntityNormalizerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\Normalizer;
|
||||
|
||||
use Drupal\serialization\Normalizer\EntityNormalizer;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\Normalizer\EntityReferenceFieldItemNormalizerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\Normalizer;
|
||||
|
||||
use Drupal\Core\Entity\EntityInterface;
|
||||
|
@ -78,6 +73,12 @@ class EntityReferenceFieldItemNormalizerTest extends UnitTestCase {
|
|||
$entity->url('canonical')
|
||||
->willReturn($test_url)
|
||||
->shouldBeCalled();
|
||||
$entity->uuid()
|
||||
->willReturn('080e3add-f9d5-41ac-9821-eea55b7b42fb')
|
||||
->shouldBeCalled();
|
||||
$entity->getEntityTypeId()
|
||||
->willReturn('test_type')
|
||||
->shouldBeCalled();
|
||||
|
||||
$entity_reference = $this->prophesize(TypedDataInterface::class);
|
||||
$entity_reference->getValue()
|
||||
|
@ -92,6 +93,8 @@ class EntityReferenceFieldItemNormalizerTest extends UnitTestCase {
|
|||
|
||||
$expected = [
|
||||
'target_id' => ['value' => 'test'],
|
||||
'target_type' => 'test_type',
|
||||
'target_uuid' => '080e3add-f9d5-41ac-9821-eea55b7b42fb',
|
||||
'url' => $test_url,
|
||||
];
|
||||
$this->assertSame($expected, $normalized);
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\Normalizer\ListNormalizerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\Normalizer;
|
||||
|
||||
use Drupal\Core\TypedData\DataDefinition;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\Normalizer\NullNormalizerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\Normalizer;
|
||||
|
||||
use Drupal\serialization\Normalizer\NullNormalizer;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\serialization\Unit\Normalizer\TypedDataNormalizerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\serialization\Unit\Normalizer;
|
||||
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
|
Reference in a new issue