ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
GroupTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Tests\Refinery\Random
;
22
23
use
ILIAS\Refinery\Random\Group
as RandomGroup;
24
use PHPUnit\Framework\TestCase;
25
use
ILIAS\Refinery\Random\Seed\Seed
;
26
use
ILIAS\Refinery\Random\Transformation\ShuffleTransformation
;
27
use
ILIAS\Refinery\IdentityTransformation
;
28
29
class
GroupTest
extends
TestCase
30
{
31
private
RandomGroup
$group
;
32
33
protected
function
setUp
(): void
34
{
35
$this->group =
new
RandomGroup();
36
}
37
38
public
function
testShuffle
(): void
39
{
40
$mock = $this->getMockBuilder(Seed::class)->getMock();
41
$mock->expects(self::never())->method(
'seedRandomGenerator'
);
42
$instance = $this->group->shuffleArray($mock);
43
$this->assertInstanceOf(ShuffleTransformation::class, $instance);
44
}
45
46
public
function
testDontShuffle
(): void
47
{
48
$instance = $this->group->dontShuffle();
49
$this->assertInstanceOf(IdentityTransformation::class, $instance);
50
}
51
}
ILIAS\Refinery\IdentityTransformation
Definition:
IdentityTransformation.php:24
ILIAS\Refinery\Random\Group
Definition:
Group.php:29
ILIAS\Refinery\Random\Transformation\ShuffleTransformation
!! BEWARE OF THE SIDE EFFECT.
Definition:
ShuffleTransformation.php:37
ILIAS\Tests\Refinery\Random\GroupTest
Definition:
GroupTest.php:30
ILIAS\Tests\Refinery\Random\GroupTest\testDontShuffle
testDontShuffle()
Definition:
GroupTest.php:46
ILIAS\Tests\Refinery\Random\GroupTest\setUp
setUp()
Definition:
GroupTest.php:33
ILIAS\Tests\Refinery\Random\GroupTest\$group
RandomGroup $group
Definition:
GroupTest.php:31
ILIAS\Tests\Refinery\Random\GroupTest\testShuffle
testShuffle()
Definition:
GroupTest.php:38
ILIAS\Refinery\Random\Seed\Seed
Definition:
Seed.php:24
ILIAS\Tests\Refinery\Random
Definition:
GroupTest.php:21
components
ILIAS
Refinery
tests
Random
GroupTest.php
Generated on Sun Oct 19 2025 23:03:27 for ILIAS by
1.9.4 (using
Doxyfile
)