Skip to content

random: Add additional test for Randomizer::getFloat() #12436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions ext/random/tests/02_engine/all_serialize_user.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,13 @@ Random: Engine: Serialization of user engines must preserve the sequence
<?php

use Random\Engine;
use Random\Engine\Test\TestCountingEngine32;
use Random\Engine\Test\TestShaEngine;

require __DIR__ . "/../engines.inc";

final class CountingEngine32 implements Engine
{
private int $count = 0;

public function generate(): string
{
return pack('V', ++$this->count);
}
}

$engines = [];
$engines[] = new CountingEngine32();
$engines[] = new TestCountingEngine32();
$engines[] = new TestShaEngine();

foreach ($engines as $engine) {
Expand All @@ -42,6 +33,6 @@ die('success');

?>
--EXPECT--
CountingEngine32
Random\Engine\Test\TestCountingEngine32
Random\Engine\Test\TestShaEngine
success
Loading