Skip to content

Commit 44182f7

Browse files
author
Ivan Gavryshko
committed
MAGETWO-47940: [Git][PR] Bunch of public PRs #2959 #2730
- added testace
1 parent f2fd2e2 commit 44182f7

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

app/code/Magento/Backend/Test/Unit/Model/Locale/ManagerTest.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ManagerTest extends \PHPUnit_Framework_TestCase
1515
protected $_model;
1616

1717
/**
18-
* @var \Magento\Framework\TranslateInterface
18+
* @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\TranslateInterface
1919
*/
2020
protected $_translator;
2121

@@ -25,12 +25,12 @@ class ManagerTest extends \PHPUnit_Framework_TestCase
2525
protected $_session;
2626

2727
/**
28-
* @var \Magento\Backend\Model\Auth\Session
28+
* @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Backend\Model\Auth\Session
2929
*/
3030
protected $_authSession;
3131

3232
/**
33-
* @var \Magento\Backend\App\ConfigInterface
33+
* @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Backend\App\ConfigInterface
3434
*/
3535
protected $_backendConfig;
3636

@@ -110,4 +110,17 @@ public function testGetUserInterfaceLocale()
110110

111111
$this->assertEquals($locale, 'de_DE');
112112
}
113+
114+
/**
115+
* @covers \Magento\Backend\Model\Locale\Manager::getUserInterfaceLocale
116+
*/
117+
public function testGetUserInterfaceGeneralLocale()
118+
{
119+
$this->_backendConfig->expects($this->any())
120+
->method('getValue')
121+
->with('general/locale/code')
122+
->willReturn('test_locale');
123+
$locale = $this->_model->getUserInterfaceLocale();
124+
$this->assertEquals($locale, 'test_locale');
125+
}
113126
}

0 commit comments

Comments
 (0)