updated core from 8.4 to 8.5 : bug with login_destination

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-13 14:01:21 +01:00
parent 0d78da249b
commit e668535a4e
3486 changed files with 89604 additions and 33283 deletions
@@ -9,8 +9,8 @@ dependencies:
- image
configure: entity.responsive_image_style.collection
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -9,6 +9,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Form controller for the responsive image edit/add forms.
*
* @internal
*/
class ResponsiveImageStyleForm extends EntityForm {
@@ -6,8 +6,8 @@ package: Testing
# core: 8.x
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
# Information added by Drupal.org packaging script on 2018-03-07
version: '8.5.0'
core: '8.x'
project: 'drupal'
datestamp: 1515021228
datestamp: 1520457825
@@ -3,6 +3,8 @@
namespace Drupal\Tests\responsive_image\Unit;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\EntityTypeRepositoryInterface;
use Drupal\responsive_image\Entity\ResponsiveImageStyle;
use Drupal\Tests\UnitTestCase;
@@ -20,11 +22,11 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
protected $entityType;
/**
* The entity manager used for testing.
* The entity type manager used for testing.
*
* @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
* @var \Drupal\Core\Entity\EntityTypeManagerInterface|\PHPUnit_Framework_MockObject_MockObject
*/
protected $entityManager;
protected $entityTypeManager;
/**
* The breakpoint manager used for testing.
@@ -42,8 +44,8 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
->method('getProvider')
->will($this->returnValue('responsive_image'));
$this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
$this->entityManager->expects($this->any())
$this->entityTypeManager = $this->getMock(EntityTypeManagerInterface::class);
$this->entityTypeManager->expects($this->any())
->method('getDefinition')
->with('responsive_image_style')
->will($this->returnValue($this->entityType));
@@ -51,7 +53,7 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
$this->breakpointManager = $this->getMock('\Drupal\breakpoint\BreakpointManagerInterface');
$container = new ContainerBuilder();
$container->set('entity.manager', $this->entityManager);
$container->set('entity_type.manager', $this->entityTypeManager);
$container->set('breakpoint.manager', $this->breakpointManager);
\Drupal::setContainer($container);
}
@@ -74,11 +76,14 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
->method('loadMultiple')
->with(array_keys($styles))
->willReturn($styles);
$this->entityManager->expects($this->any())
$this->entityTypeManager->expects($this->any())
->method('getStorage')
->with('image_style')
->willReturn($storage);
$this->entityManager->expects($this->any())
$entity_type_repository = $this->getMockForAbstractClass(EntityTypeRepositoryInterface::class);
$entity_type_repository->expects($this->any())
->method('getEntityTypeFromClass')
->with('Drupal\image\Entity\ImageStyle')
->willReturn('image_style');
@@ -103,6 +108,8 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
->with('test_group')
->willReturn(['bartik' => 'theme', 'toolbar' => 'module']);
\Drupal::getContainer()->set('entity_type.repository', $entity_type_repository);
$dependencies = $entity->calculateDependencies()->getDependencies();
$this->assertEquals(['toolbar'], $dependencies['module']);
$this->assertEquals(['bartik'], $dependencies['theme']);