ILIAS
trunk Revision v11.0_alpha-2645-g16283d3b3f8
◀ 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\Tests\Refinery\Random\GroupTest\testDontShuffle
testDontShuffle()
Definition:
GroupTest.php:46
Seed
ILIAS\Tests\Refinery\Random\GroupTest\testShuffle
testShuffle()
Definition:
GroupTest.php:38
ILIAS\Tests\Refinery\Random\GroupTest
Definition:
GroupTest.php:29
IdentityTransformation
ILIAS\Tests\Refinery\Random
Definition:
GroupTest.php:21
ShuffleTransformation
ILIAS\Refinery\Random\Group
Definition:
Group.php:28
ILIAS\Tests\Refinery\Random\GroupTest\setUp
setUp()
Definition:
GroupTest.php:33
ILIAS\Tests\Refinery\Random\GroupTest\$group
RandomGroup $group
Definition:
GroupTest.php:31
TestCase
components
ILIAS
Refinery
tests
Random
GroupTest.php
Generated on Mon Sep 1 2025 23:03:42 for ILIAS by
1.8.13 (using
Doxyfile
)