1--TEST--
2Random: Randomizer: getBytesFromString(): Parameters are correctly validated
3--FILE--
4<?php
5
6use Random\Randomizer;
7
8function randomizer(): Randomizer
9{
10    return new Randomizer();
11}
12
13try {
14    var_dump(randomizer()->getBytesFromString("", 2));
15} catch (ValueError $e) {
16    echo $e->getMessage(), PHP_EOL;
17}
18
19try {
20    var_dump(randomizer()->getBytesFromString("abc", 0));
21} catch (ValueError $e) {
22    echo $e->getMessage(), PHP_EOL;
23}
24
25?>
26--EXPECTF--
27Random\Randomizer::getBytesFromString(): Argument #1 ($string) cannot be empty
28Random\Randomizer::getBytesFromString(): Argument #2 ($length) must be greater than 0
29