We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deb95f8 commit 2551372Copy full SHA for 2551372
test/MenuItem/StaticItemTest.php
@@ -69,6 +69,24 @@ public function testGetRowsWithContentWhichDoesNotFitOnOneLineIsWrapped() : void
69
);
70
}
71
72
+ public function testSetText() : void
73
+ {
74
+ $menuStyle = $this->createMock(MenuStyle::class);
75
+
76
+ $menuStyle
77
+ ->expects($this->once())
78
+ ->method('getContentWidth')
79
+ ->will($this->returnValue(10));
80
81
+ $item = new StaticItem('CONTENT');
82
+ $item->setText('CONTENT 2 LINES');
83
84
+ $this->assertEquals(
85
+ ['CONTENT 2', 'LINES'],
86
+ $item->getRows($menuStyle)
87
+ );
88
+ }
89
90
public function testHideAndShowItemExtraHasNoEffect() : void
91
{
92
$item = new StaticItem('CONTENT 1 LINE');
0 commit comments