File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,35 @@ public function testTableWithPercentCharacters() {
146
146
| % at start | at end % | in % middle |
147
147
+------------+----------+-------------+
148
148
149
+ OUT;
150
+ $ this ->assertInOutEquals (array ($ headers , $ rows ), $ output );
151
+ }
152
+
153
+ /**
154
+ * Test that a % is appropriately padded in the table
155
+ */
156
+ public function testTablePaddingWithPercentCharacters () {
157
+ $ headers = array ( 'ID ' , 'post_title ' , 'post_name ' );
158
+ $ rows = array (
159
+ array (
160
+ 3 ,
161
+ '10% ' ,
162
+ ''
163
+ ),
164
+ array (
165
+ 1 ,
166
+ 'Hello world! ' ,
167
+ 'hello-world '
168
+ ),
169
+ );
170
+ $ output = <<<'OUT'
171
+ +----+--------------+-------------+
172
+ | ID | post_title | post_name |
173
+ +----+--------------+-------------+
174
+ | 3 | 10% | |
175
+ | 1 | Hello world! | hello-world |
176
+ +----+--------------+-------------+
177
+
149
178
OUT;
150
179
$ this ->assertInOutEquals (array ($ headers , $ rows ), $ output );
151
180
}
You can’t perform that action at this time.
0 commit comments