ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
GroupTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\Refinery\Random\Group as RandomGroup;
24use PHPUnit\Framework\TestCase;
28
29class 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}