Skip to content

Commit cbad9d2

Browse files
authored
Add tests
1 parent bceaae7 commit cbad9d2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/MenuItem/AsciiArtItemTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ public function testGetRowsCenterAligned() : void
9696
],
9797
$item->getRows($menuStyle)
9898
);
99+
100+
$item = new AsciiArtItem(" // \n//////////", AsciiArtItem::POSITION_CENTER);
101+
$this->assertEquals(
102+
[
103+
" // ",
104+
"//////////",
105+
],
106+
$item->getRows($menuStyle)
107+
);
99108
}
100109

101110
public function testGetRowsCenterAlignedWithOddWidth() : void
@@ -115,6 +124,15 @@ public function testGetRowsCenterAlignedWithOddWidth() : void
115124
],
116125
$item->getRows($menuStyle)
117126
);
127+
128+
$item = new AsciiArtItem(" // \n//////////", AsciiArtItem::POSITION_CENTER);
129+
$this->assertEquals(
130+
[
131+
" // ",
132+
" //////////",
133+
],
134+
$item->getRows($menuStyle)
135+
);
118136
}
119137

120138
public function testHideAndShowItemExtraHasNoEffect() : void

0 commit comments

Comments
 (0)