ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
GroupTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\Data\Factory as DataFactory;
24use ILIAS\Refinery\String\Group as StringGroup;
27use PHPUnit\Framework\TestCase;
29use PHPUnit\Framework\MockObject\Stub;
30
31class GroupTest extends TestCase
32{
33 private StringGroup $group;
34
35 protected function setUp(): void
36 {
37 $dataFactory = new DataFactory();
39 $language = $this->createStub(\ILIAS\Language\Language::class);
40
41 $this->group = new StringGroup($dataFactory, $language);
42 }
43
44 public function testGreaterThanInstance(): void
45 {
46 $instance = $this->group->hasMaxLength(42);
47 $this->assertInstanceOf(HasMaxLength::class, $instance);
48 }
49
50 public function testLowerThanInstance(): void
51 {
52 $instance = $this->group->hasMinLength(42);
53 $this->assertInstanceOf(HasMinLength::class, $instance);
54 }
55
56 public function testMakeClickable(): void
57 {
58 $instance = $this->group->makeClickable();
59 $this->assertInstanceOf(MakeClickable::class, $instance);
60 }
61}
Builds data types.
Definition: Factory.php:36
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.