/** * Test for the magic method __wakeup * * @covers \Magento\Framework\App\Response\Http::__wakeup */ public function testWakeUpWith() { $objectManagerMock = $this->getMock('Magento\\Framework\\App\\ObjectManager', [], [], '', false); $objectManagerMock->expects($this->once())->method('create')->with('Magento\\Framework\\Stdlib\\CookieManagerInterface')->will($this->returnValue($this->cookieManagerMock)); $objectManagerMock->expects($this->at(1))->method('get')->with('Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory')->will($this->returnValue($this->cookieMetadataFactoryMock)); \Magento\Framework\App\ObjectManager::setInstance($objectManagerMock); $this->model->__wakeup(); }