Skip to content

Commit

Permalink
Update serializer used in integration test
Browse files Browse the repository at this point in the history
Replace serialize with it's interface. Also passes the serializer when
instantiating the test subject. This ensures the correct implementation is used
becuase the interface preference and fallback in the constructor do not match.
  • Loading branch information
pmclain committed Oct 25, 2018
1 parent a901ad3 commit 7dae4c1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected function setUp()
{
$this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();

$this->serializer = $this->objectManager->get(\Magento\Framework\Serialize\Serializer\Serialize::class);
$this->serializer = $this->objectManager->get(\Magento\Framework\Serialize\SerializerInterface::class);
$this->cache = $this->objectManager->get(\Magento\Framework\App\CacheInterface::class);
$this->configWriter = $this->objectManager->get(\Magento\Framework\App\ObjectManager\ConfigWriter\Filesystem::class);

Expand Down Expand Up @@ -130,6 +130,7 @@ private function getConfig()
[
'cacheId' => self::CACHE_ID,
'compiledLoader' => $this->objectManager->create(\Magento\Framework\App\ObjectManager\ConfigLoader\Compiled::class),
'serializer' => $this->serializer,
]
);
}
Expand Down

0 comments on commit 7dae4c1

Please sign in to comment.