File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
app/code/Magento/Backend/Test/Unit/Model/Locale Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class ManagerTest extends \PHPUnit_Framework_TestCase
15
15
protected $ _model ;
16
16
17
17
/**
18
- * @var \Magento\Framework\TranslateInterface
18
+ * @var \PHPUnit_Framework_MockObject_MockObject|\ Magento\Framework\TranslateInterface
19
19
*/
20
20
protected $ _translator ;
21
21
@@ -25,12 +25,12 @@ class ManagerTest extends \PHPUnit_Framework_TestCase
25
25
protected $ _session ;
26
26
27
27
/**
28
- * @var \Magento\Backend\Model\Auth\Session
28
+ * @var \PHPUnit_Framework_MockObject_MockObject|\ Magento\Backend\Model\Auth\Session
29
29
*/
30
30
protected $ _authSession ;
31
31
32
32
/**
33
- * @var \Magento\Backend\App\ConfigInterface
33
+ * @var \PHPUnit_Framework_MockObject_MockObject|\ Magento\Backend\App\ConfigInterface
34
34
*/
35
35
protected $ _backendConfig ;
36
36
@@ -110,4 +110,17 @@ public function testGetUserInterfaceLocale()
110
110
111
111
$ this ->assertEquals ($ locale , 'de_DE ' );
112
112
}
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
+ }
113
126
}
You can’t perform that action at this time.
0 commit comments