Skip to content

Commit 676171e

Browse files
committed
add more tests for parse rule
1 parent 228d42a commit 676171e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/CommonTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ public function testParseRule_string(): void
143143
$define = $p->parseOpt('ints;this is an array, allow multi value;no;[23,45];', 'ids');
144144
$this->assertFalse($define['required']);
145145
$this->assertEmpty($define['shorts']);
146-
$this->assertSame([23,45], $define['default']);
146+
$this->assertSame([23, 45], $define['default']);
147+
148+
$define = $p->parseOpt('array;this is an array, allow multi value;no;[23,45];', 'ids');
149+
$this->assertFalse($define['required']);
150+
$this->assertEmpty($define['shorts']);
151+
$this->assertSame(['23', '45'], $define['default']);
147152
}
148153
}

0 commit comments

Comments
 (0)