File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,20 @@ public function testGetRowsReturnsStaticAltItemWhenWidthIsTooSmall() : void
142
142
self ::assertSame (['my alt ' ], $ item ->getRows ($ menuStyle ));
143
143
}
144
144
145
+ public function testGetRowsDoesNotReturnsStaticAltItemWhenOnlySpacesOverflow () : void
146
+ {
147
+ $ menuStyle = $ this ->createMock (MenuStyle::class);
148
+
149
+ $ menuStyle
150
+ ->expects ($ this ->any ())
151
+ ->method ('getContentWidth ' )
152
+ ->will ($ this ->returnValue (15 ));
153
+
154
+ $ item = new AsciiArtItem ('NOT TOO LONG ' , AsciiArtItem::POSITION_LEFT , 'my alt ' );
155
+
156
+ self ::assertSame (['NOT TOO LONG ' ], $ item ->getRows ($ menuStyle ));
157
+ }
158
+
145
159
public function testWithRealAsciiArtCenterAligned () : void
146
160
{
147
161
$ menuStyle = $ this ->createMock (MenuStyle::class);
You can’t perform that action at this time.
0 commit comments