markTestSkipped('To be fixed in MAGETWO-34751'); global $mockPHPFunctions; require_once __DIR__ . '/_files/mock_ini_set.php'; require_once __DIR__ . '/_files/mock_session_regenerate_id.php'; $mockPHPFunctions = true; $this->mockSessionConfig = $this->getMockBuilder(\Magento\Framework\Session\Config\ConfigInterface::class) ->disableOriginalConstructor() ->getMock(); $this->mockCookieManager = $this->createMock(\Magento\Framework\Stdlib\CookieManagerInterface::class); $this->mockCookieMetadataFactory = $this->getMockBuilder( \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory::class ) ->disableOriginalConstructor() ->getMock(); $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); $arguments = [ 'sessionConfig' => $this->mockSessionConfig, 'cookieManager' => $this->mockCookieManager, 'cookieMetadataFactory' => $this->mockCookieMetadataFactory, ]; $this->sessionManager = $this->objectManager->getObject( \Magento\Framework\Session\SessionManager::class, $arguments ); } public function testSessionManagerConstructor() { self::$isIniSetInvoked = false; $this->objectManager->getObject(\Magento\Framework\Session\SessionManager::class); $this->assertTrue(SessionManagerTest::$isIniSetInvoked); } } }