1--TEST--
2Random: Randomizer: getInt(): Returned values with insufficient bits are correctly expanded
3--FILE--
4<?php
5
6use Random\Engine;
7use Random\Randomizer;
8
9final class ByteEngine implements Engine
10{
11    public $count = 0;
12
13    public function generate(): string
14    {
15        return "\x01\x02\x03\x04\x05\x06\x07\x08"[$this->count++];
16    }
17}
18
19$randomizer = new Randomizer(new ByteEngine());
20
21var_dump(bin2hex(pack('V', $randomizer->getInt(0, 0x00FF_FFFF))));
22
23?>
24--EXPECT--
25string(8) "01020300"
26