File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -44,4 +44,38 @@ public function testGetLogoSrc()
44
44
45
45
$ this ->assertEquals ('http://localhost/pub/media/logo/default/image.gif ' , $ block ->getLogoSrc ());
46
46
}
47
+
48
+ /**
49
+ * cover \Magento\Theme\Block\Html\Header\Logo::getLogoHeight
50
+ */
51
+ public function testGetLogoHeight ()
52
+ {
53
+ $ scopeConfig = $ this ->createMock (\Magento \Framework \App \Config \ScopeConfigInterface::class);
54
+ $ scopeConfig ->expects ($ this ->once ())->method ('getValue ' )->willReturn (null );
55
+
56
+ $ objectManager = new \Magento \Framework \TestFramework \Unit \Helper \ObjectManager ($ this );
57
+ $ arguments = [
58
+ 'scopeConfig ' => $ scopeConfig ,
59
+ ];
60
+ $ block = $ objectManager ->getObject (\Magento \Theme \Block \Html \Header \Logo::class, $ arguments );
61
+
62
+ $ this ->assertEquals (null , $ block ->getLogoHeight ());
63
+ }
64
+
65
+ /**
66
+ * @covers \Magento\Theme\Block\Html\Header\Logo::getLogoWidth
67
+ */
68
+ public function testGetLogoWidth ()
69
+ {
70
+ $ scopeConfig = $ this ->createMock (\Magento \Framework \App \Config \ScopeConfigInterface::class);
71
+ $ scopeConfig ->expects ($ this ->once ())->method ('getValue ' )->willReturn ('170 ' );
72
+
73
+ $ objectManager = new \Magento \Framework \TestFramework \Unit \Helper \ObjectManager ($ this );
74
+ $ arguments = [
75
+ 'scopeConfig ' => $ scopeConfig ,
76
+ ];
77
+ $ block = $ objectManager ->getObject (\Magento \Theme \Block \Html \Header \Logo::class, $ arguments );
78
+
79
+ $ this ->assertEquals ('170 ' , $ block ->getLogoHeight ());
80
+ }
47
81
}
You can’t perform that action at this time.
0 commit comments