major update
This commit is contained in:
@@ -80,4 +80,16 @@ class RepoQueryTest extends TestCase
|
||||
$this->assertSame(['foo = ?'], $where);
|
||||
$this->assertSame(['bar'], $params);
|
||||
}
|
||||
|
||||
public function testNormalizeStringList(): void
|
||||
{
|
||||
$list = RepoQuery::normalizeStringList(' a, b, a ,, c ');
|
||||
$this->assertSame(['a', 'b', 'c'], $list);
|
||||
|
||||
$list = RepoQuery::normalizeStringList([' A ', ['B', 'a'], ''], 10, static fn (string $value): string => strtolower($value));
|
||||
$this->assertSame(['a', 'b'], $list);
|
||||
|
||||
$list = RepoQuery::normalizeStringList('1,2,3,4', 2);
|
||||
$this->assertSame(['1', '2'], $list);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user