Home
last modified time | relevance | path

Searched refs:Randomizer (Results 1 – 25 of 27) sorted by relevance

12

/PHP-8.2/ext/random/tests/03_randomizer/
H A Dconstruct_twice.phpt2 Random: Randomizer: Calling __construct() fails due to readonly $engine property
10 use Random\Randomizer;
15 (new Randomizer())->__construct();
21 $randomizer = new Randomizer(new Xoshiro256StarStar());
28 $randomizer = new Randomizer(new TestShaEngine("1234"));
35 $randomizer = new Randomizer(new Xoshiro256StarStar());
47 Cannot modify readonly property Random\Randomizer::$engine
48 Cannot modify readonly property Random\Randomizer::$engine
49 Cannot modify readonly property Random\Randomizer::$engine
50 Cannot modify readonly property Random\Randomizer::$engine
H A Dreadonly.phpt2 Random: Randomizer: The engine property must be readonly
8 use Random\Randomizer;
10 $randomizer = new Randomizer(new PcgOneseq128XslRr64(1234));
11 $referenceRandomizer = new Randomizer(new PcgOneseq128XslRr64(1234));
29 Cannot modify readonly property Random\Randomizer::$engine
H A Dserialize_disallowed.phpt2 Random: Randomizer: Serialization of the Randomizer fails if the engine is not serializable
7 use Random\Randomizer;
10 serialize(new Randomizer(new Secure()));
H A Dengine_unsafe_throws.phpt2 Random: Randomizer: Engines throwing an exception are gracefully handled
7 use Random\Randomizer;
17 $randomizer = new Randomizer(new ThrowingEngine());
26 #1 %s(%d): Random\Randomizer->getBytes(1)
H A Dengine_unsafe_exits.phpt2 Random: Randomizer: Engines calling exit() are gracefully handled
7 use Random\Randomizer;
17 $randomizer = new Randomizer(new ExitingEngine());
H A Dcompatibility_user.phpt2 Random: Randomizer: Native engines can be wrapped without changing their sequence
11 use Random\Randomizer;
23 $native_randomizer = new Randomizer(clone $engine);
24 $user_randomizer = new Randomizer(new TestWrapperEngine(clone $engine));
H A Dcompatibility_mt_rand.phpt2 Random: Randomizer: The Mt19937 engine is a drop-in replacement for mt_rand()
6 use Random\Randomizer;
11 $randomizer = new Randomizer(new Mt19937(1234, MT_RAND_PHP));
28 $randomizer = new Randomizer(new Mt19937(1234, MT_RAND_MT19937));
H A Dserialize.phpt2 Random: Randomizer: Serialization of the Randomizer must preserve the sequence
11 use Random\Randomizer;
25 $randomizer = new Randomizer($engine);
H A Dcompatibility_array_rand.phpt2 Random: Randomizer: The Mt19937 engine and pickArrayKeys are consistent with array_rand()
7 use Random\Randomizer;
20 $randomizer = new Randomizer(new Mt19937(1234));
H A Dengine_unsafe_biased.phpt2 Random: Randomizer: Heavily biased engines are detected and rejected
7 use Random\Randomizer;
17 function randomizer(): Randomizer
19 return new Randomizer(new HeavilyBiasedEngine());
H A Dengine_unsafe_empty_string.phpt2 Random: Randomizer: Engines returning an empty string are detected and rejected
7 use Random\Randomizer;
17 function randomizer(): Randomizer
19 return new Randomizer(new EmptyStringEngine());
H A Dgh_9186_unserialize.phpt7 …unserialize('O:17:"Random\Randomizer":1:{i:0;a:2:{s:3:"foo";N;s:6:"engine";O:32:"Random\Engine\Xos…
14 Invalid serialization data for Random\Randomizer object
H A Dengine_unsafe_nul.phpt2 Random: Randomizer: Nul engines are correctly handled
7 use Random\Randomizer;
17 function randomizer(): Randomizer
19 return new Randomizer(new NulEngine());
/PHP-8.2/ext/random/tests/03_randomizer/methods/
H A DpickArrayKeys_error.phpt2 Random: Randomizer: pickArrayKeys(): Parameters are correctly validated
6 use Random\Randomizer;
8 function randomizer(): Randomizer
10 return new Randomizer();
45 Random\Randomizer::pickArrayKeys(): Argument #1 ($array) must be of type array, string given
46 Random\Randomizer::pickArrayKeys(): Argument #1 ($array) cannot be empty
47 Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements…
48 Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements…
49 Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements…
H A DgetInt_gh9415.phpt2 GH-9415: Randomizer::getInt(0, 2**32 - 1) with Mt19937 always returns 1
6 use Random\Randomizer;
9 $randomizer = new Randomizer(new Mt19937(1234));
13 $randomizer = new Randomizer(new Mt19937(4321));
H A DnextInt_64_engine_on_32_platform.phpt2 Random: Randomizer: nextInt(): Throws for 64 bit engines on 32 bit platforms
8 use Random\Randomizer;
11 $randomizer = new Randomizer(new Xoshiro256StarStar());
H A DgetInt_expansion_32.phpt2 Random: Randomizer: getInt(): Returned values with insufficient bits are correctly expanded
7 use Random\Randomizer;
19 $randomizer = new Randomizer(new ByteEngine());
H A DgetInt_expansion_64.phpt2 Random: Randomizer: getInt(): Returned values with insufficient bits are correctly expanded (64 Bit)
9 use Random\Randomizer;
21 $randomizer = new Randomizer(new ByteEngine());
H A DgetBytes_expansion.phpt2 Random: Randomizer: getBytes(): Returned bytes are consistently expanded
7 use Random\Randomizer;
28 $randomizer = new Randomizer(new TestEngine());
H A DgetBytes.phpt2 Random: Randomizer: getBytes(): Basic functionality
12 use Random\Randomizer;
27 $randomizer = new Randomizer($engine);
H A DnextInt.phpt2 Random: Randomizer: nextInt(): Basic functionality
12 use Random\Randomizer;
27 $randomizer = new Randomizer($engine);
H A DgetInt.phpt2 Random: Randomizer: getInt(): Basic functionality
12 use Random\Randomizer;
27 $randomizer = new Randomizer($engine);
H A DshuffleArray.phpt2 Random: Randomizer: shuffleArray(): Basic functionality
12 use Random\Randomizer;
27 $randomizer = new Randomizer($engine);
H A DshuffleBytes.phpt2 Random: Randomizer: shuffleBytes(): Basic functionality
12 use Random\Randomizer;
34 $randomizer = new Randomizer($engine);
H A DpickArrayKeys.phpt2 Random: Randomizer: pickArrayKeys(): Basic functionality
12 use Random\Randomizer;
39 $randomizer = new Randomizer($engine);

Completed in 15 milliseconds

12