Skip to content
Snippets Groups Projects
Commit b072b985 authored by Joan He's avatar Joan He
Browse files

Merge remote-tracking branch 'upstream/develop' into pr

# Conflicts:
#	dev/tests/integration/testsuite/Magento/Framework/TranslateTest.php
#	lib/internal/Magento/Framework/App/Config/ScopePool.php
#	lib/internal/Magento/Framework/App/ResourceConnection/Config.php
#	lib/internal/Magento/Framework/App/Test/Unit/Config/ScopePoolTest.php
#	lib/internal/Magento/Framework/App/Test/Unit/ResourceConnection/ConfigTest.php
parent dd55965a
Branches
No related merge requests found
<?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\App\Config;
use Magento\TestFramework\Helper\Bootstrap;
use Magento\Framework\App\Cache\Frontend\Pool;
use \Magento\Framework\App\Config\ScopePool;
class ScopePoolTest extends \PHPUnit_Framework_TestCase
{
/**
* @var ScopePool
*/
private $scopePool;
protected function setUp()
{
/** @var \Magento\TestFramework\ObjectManager $objectManager */
$objectManager = Bootstrap::getObjectManager();
$objectManager->removeSharedInstance(ScopePool::class);
$this->scopePool = $objectManager->get(ScopePool::class);
}
/**
* @param string $scopeType
* @param string $scopeCode
* @dataProvider getScopeDataProvider
*/
public function testGetScope($scopeType, $scopeCode = null)
{
$this->scopePool->clean();
$this->assertEquals(
$this->scopePool->getScope($scopeType, $scopeCode),
$this->scopePool->getScope($scopeType, $scopeCode)
);
}
public function getScopeDataProvider()
{
return [
['default'],
['stores', 'default'],
['websites', 'default']
];
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment