mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2025-01-22 05:11:47 +01:00
[Random] increase code coverage
This commit is contained in:
parent
441c0cadae
commit
1d27476584
@ -18,6 +18,11 @@ class BytesTest extends TestCase
|
||||
self::assertSame(32, Str\Byte\length($random));
|
||||
}
|
||||
|
||||
public function testBytesEarlyReturnForZeroLength(): void
|
||||
{
|
||||
self::assertSame('', Random\bytes(0));
|
||||
}
|
||||
|
||||
public function testBytesThrowsForNegativeLength(): void
|
||||
{
|
||||
$this->expectException(Exception\InvariantViolationException::class);
|
||||
|
@ -31,6 +31,11 @@ class StringTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testStringEarlyReturnForZeroLength(): void
|
||||
{
|
||||
self::assertSame('', Random\string(0));
|
||||
}
|
||||
|
||||
public function testStringThrowsForNegativeLength(): void
|
||||
{
|
||||
$this->expectException(Exception\InvariantViolationException::class);
|
||||
|
Loading…
x
Reference in New Issue
Block a user