ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
GroupTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
23 use ILIAS\Refinery\KindlyTo\Group as KindlyToGroup;
33 
34 class GroupTest extends TestCase
35 {
36  private KindlyToGroup $basicGroup;
37 
38  protected function setUp(): void
39  {
40  $this->basicGroup = new KindlyToGroup(new \ILIAS\Data\Factory());
41  }
42 
43  public function testIsStringTransformationInstance(): void
44  {
45  $transformation = $this->basicGroup->string();
46  $this->assertInstanceOf(StringTransformation::class, $transformation);
47  }
48 
49  public function testIsBooleanTransformationInstance(): void
50  {
51  $transformation = $this->basicGroup->bool();
52  $this->assertInstanceOf(BooleanTransformation::class, $transformation);
53  }
54 
55  public function testIsDateTimeTransformationInterface(): void
56  {
57  $transformation = $this->basicGroup->dateTime();
58  $this->assertInstanceOf(DateTimeTransformation::class, $transformation);
59  }
60 
61  public function testIsIntegerTransformationInterface(): void
62  {
63  $transformation = $this->basicGroup->int();
64  $this->assertInstanceOf(IntegerTransformation::class, $transformation);
65  }
66 
67  public function testIsFloatTransformationInterface(): void
68  {
69  $transformation = $this->basicGroup->float();
70  $this->assertInstanceOf(FloatTransformation::class, $transformation);
71  }
72 
73  public function testIsRecordTransformationInterface(): void
74  {
75  $transformation = $this->basicGroup->recordOf(['tostring' => new StringTransformation()]);
76  $this->assertInstanceOf(RecordTransformation::class, $transformation);
77  }
78 
79  public function testIsTupleTransformationInterface(): void
80  {
81  $transformation = $this->basicGroup->tupleOf([new StringTransformation()]);
82  $this->assertInstanceOf(TupleTransformation::class, $transformation);
83  }
84 
85  public function testNewDictionaryTransformation(): void
86  {
87  $transformation = $this->basicGroup->dictOf(new StringTransformation());
88  $this->assertInstanceOf(DictionaryTransformation::class, $transformation);
89  }
90 }
Transformations in this group transform data to primitive types to establish a baseline for more comp...
Definition: Group.php:47
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: GroupTest.php:21