ILIAS  release_8 Revision v8.24
GroupTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
23use ILIAS\Data\Factory as DataFactory;
24use ILIAS\Refinery\String\Group as StringGroup;
29use ilLanguage;
30
31class GroupTest extends TestCase
32{
33 private StringGroup $group;
34
35 protected function setUp(): void
36 {
37 $dataFactory = new DataFactory();
38 $language = $this->getMockBuilder(ilLanguage::class)
39 ->disableOriginalConstructor()
40 ->getMock();
41
42 $this->group = new StringGroup($dataFactory, $language);
43 }
44
45 public function testGreaterThanInstance(): void
46 {
47 $instance = $this->group->hasMaxLength(42);
48 $this->assertInstanceOf(HasMaxLength::class, $instance);
49 }
50
51 public function testLowerThanInstance(): void
52 {
53 $instance = $this->group->hasMinLength(42);
54 $this->assertInstanceOf(HasMinLength::class, $instance);
55 }
56
57 public function testMakeClickable(): void
58 {
59 $instance = $this->group->makeClickable();
60 $this->assertInstanceOf(MakeClickable::class, $instance);
61 }
62}
Builds data types.
Definition: Factory.php:21
language handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...