From 55178aada49e9997d6ef5ee286d046fdd0daab65 Mon Sep 17 00:00:00 2001 From: Anton Kaplya <anton.kaplya@magento.com> Date: Wed, 6 Apr 2016 16:37:36 +0300 Subject: [PATCH] MAGETWO-50676: EntityManager introduction --- .../Model/ResourceModel/Block/CollectionTest.php | 6 +++--- .../Model/ResourceModel/Page/CollectionTest.php | 6 +++--- .../ResourceModel/Page/Grid/CollectionTest.php | 2 +- .../Magento/Framework/Model/EntityManager.php | 14 -------------- 4 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 lib/internal/Magento/Framework/Model/EntityManager.php diff --git a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php index fd62f62a721..711e65cfe26 100644 --- a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php +++ b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Block/CollectionTest.php @@ -21,7 +21,7 @@ class CollectionTest extends AbstractCollectionTest protected $storeManagerMock; /** - * @var \Magento\Framework\Model\Entity\MetadataPool|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\EntityManager\MetadataPool|\PHPUnit_Framework_MockObject_MockObject */ protected $metadataPoolMock; @@ -32,7 +32,7 @@ class CollectionTest extends AbstractCollectionTest $this->storeManagerMock = $this->getMockBuilder('Magento\Store\Model\StoreManagerInterface') ->getMockForAbstractClass(); - $this->metadataPoolMock = $this->getMockBuilder('Magento\Framework\Model\Entity\MetadataPool') + $this->metadataPoolMock = $this->getMockBuilder('Magento\Framework\EntityManager\MetadataPool') ->disableOriginalConstructor() ->getMock(); @@ -95,7 +95,7 @@ class CollectionTest extends AbstractCollectionTest $expectedResult[$storeData[$linkField]][] = $storeData['store_id']; } - $entityMetadataMock = $this->getMockBuilder('Magento\Framework\Model\Entity\EntityMetadata') + $entityMetadataMock = $this->getMockBuilder('Magento\Framework\EntityManager\EntityMetadata') ->disableOriginalConstructor() ->getMock(); $entityMetadataMock->expects($this->any())->method('getLinkField')->willReturn($linkField); diff --git a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php index 916e1f96c84..99d0a91ba3f 100644 --- a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php +++ b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/CollectionTest.php @@ -21,7 +21,7 @@ class CollectionTest extends AbstractCollectionTest protected $storeManagerMock; /** - * @var \Magento\Framework\Model\Entity\MetadataPool|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\EntityManager\MetadataPool|\PHPUnit_Framework_MockObject_MockObject */ protected $metadataPoolMock; @@ -32,7 +32,7 @@ class CollectionTest extends AbstractCollectionTest $this->storeManagerMock = $this->getMockBuilder('Magento\Store\Model\StoreManagerInterface') ->getMockForAbstractClass(); - $this->metadataPoolMock = $this->getMockBuilder('Magento\Framework\Model\Entity\MetadataPool') + $this->metadataPoolMock = $this->getMockBuilder('Magento\Framework\EntityManager\MetadataPool') ->disableOriginalConstructor() ->getMock(); @@ -95,7 +95,7 @@ class CollectionTest extends AbstractCollectionTest $expectedResult[$storeData[$linkField]][] = $storeData['store_id']; } - $entityMetadataMock = $this->getMockBuilder('Magento\Framework\Model\Entity\EntityMetadata') + $entityMetadataMock = $this->getMockBuilder('Magento\Framework\EntityManager\EntityMetadata') ->disableOriginalConstructor() ->getMock(); $entityMetadataMock->expects($this->any())->method('getLinkField')->willReturn($linkField); diff --git a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/Grid/CollectionTest.php b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/Grid/CollectionTest.php index 408c9c662b8..7a98c00eeab 100644 --- a/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/Grid/CollectionTest.php +++ b/app/code/Magento/Cms/Test/Unit/Model/ResourceModel/Page/Grid/CollectionTest.php @@ -11,7 +11,7 @@ use Magento\Framework\Data\Collection\Db\FetchStrategyInterface; use Magento\Framework\Data\Collection\EntityFactoryInterface; use Magento\Framework\DB\Adapter\AdapterInterface; use Magento\Framework\Event\ManagerInterface; -use Magento\Framework\Model\Entity\MetadataPool; +use Magento\Framework\EntityManager\MetadataPool; use Magento\Framework\Model\ResourceModel\Db\AbstractDb; use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; use Magento\Store\Model\StoreManagerInterface; diff --git a/lib/internal/Magento/Framework/Model/EntityManager.php b/lib/internal/Magento/Framework/Model/EntityManager.php deleted file mode 100644 index e21fe7625be..00000000000 --- a/lib/internal/Magento/Framework/Model/EntityManager.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php -/** - * Copyright © 2016 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -namespace Magento\Framework\Model; - -/** - * Class EntityManager - */ -class EntityManager extends \Magento\Framework\EntityManager\EntityManager -{ -} -- GitLab