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\Data\Factory as DataFactory;
24use ILIAS\Refinery\String\Group as StringGroup;
27use PHPUnit\Framework\TestCase;
29
30class GroupTest extends TestCase
31{
32 private StringGroup $group;
33
34 protected function setUp(): void
35 {
36 $dataFactory = new DataFactory();
37 $language = $this->getMockBuilder(\ILIAS\Language\Language::class)
38 ->disableOriginalConstructor()
39 ->getMock();
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.