Definition at line 40 of file GroupTest.php.
◆ setUp()
ILIAS\Tests\Refinery\To\GroupTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 44 of file GroupTest.php.
44 : void
45 {
46 $language = $this->getMockBuilder(Language::class)->disableOriginalConstructor()->getMock();
47 $this->basicGroup = new ToGroup(new DataFactory(), $language);
48 }
◆ testCreateDataTransformation()
ILIAS\Tests\Refinery\To\GroupTest::testCreateDataTransformation |
( |
| ) |
|
- Exceptions
-
ilException
Definition at line 158 of file GroupTest.php.
158 : void
159 {
160 $transformation = $this->basicGroup->data('alphanumeric');
161
162 $this->assertInstanceOf(NewMethodTransformation::class, $transformation);
163
164 $result = $transformation->transform(['hello']);
165
166 $this->assertInstanceOf(Alphanumeric::class, $result);
167 }
◆ testDictionaryOfTransformation()
ILIAS\Tests\Refinery\To\GroupTest::testDictionaryOfTransformation |
( |
| ) |
|
Definition at line 102 of file GroupTest.php.
102 : void
103 {
104 $transformation = $this->basicGroup->dictOf(new StringTransformation());
105
106 $this->assertInstanceOf(DictionaryTransformation::class, $transformation);
107 }
◆ testIsBooleanTransformationInstance()
ILIAS\Tests\Refinery\To\GroupTest::testIsBooleanTransformationInstance |
( |
| ) |
|
Definition at line 71 of file GroupTest.php.
71 : void
72 {
73 $transformation = $this->basicGroup->bool();
74
75 $this->assertInstanceOf(BooleanTransformation::class, $transformation);
76 }
◆ testIsFloatTransformationInstance()
ILIAS\Tests\Refinery\To\GroupTest::testIsFloatTransformationInstance |
( |
| ) |
|
Definition at line 64 of file GroupTest.php.
64 : void
65 {
66 $transformation = $this->basicGroup->float();
67
68 $this->assertInstanceOf(FloatTransformation::class, $transformation);
69 }
◆ testIsIntegerTransformationInstance()
ILIAS\Tests\Refinery\To\GroupTest::testIsIntegerTransformationInstance |
( |
| ) |
|
Definition at line 50 of file GroupTest.php.
50 : void
51 {
52 $transformation = $this->basicGroup->int();
53
54 $this->assertInstanceOf(IntegerTransformation::class, $transformation);
55 }
◆ testIsStringTransformationInstance()
ILIAS\Tests\Refinery\To\GroupTest::testIsStringTransformationInstance |
( |
| ) |
|
Definition at line 57 of file GroupTest.php.
57 : void
58 {
59 $transformation = $this->basicGroup->string();
60
61 $this->assertInstanceOf(StringTransformation::class, $transformation);
62 }
◆ testListOfTransformation()
ILIAS\Tests\Refinery\To\GroupTest::testListOfTransformation |
( |
| ) |
|
Definition at line 78 of file GroupTest.php.
78 : void
79 {
80 $transformation = $this->basicGroup->listOf(new StringTransformation());
81
82 $this->assertInstanceOf(ListTransformation::class, $transformation);
83 }
◆ testNewMethodTransformation()
ILIAS\Tests\Refinery\To\GroupTest::testNewMethodTransformation |
( |
| ) |
|
- Exceptions
-
ilException
Definition at line 122 of file GroupTest.php.
122 : void
123 {
124 $transformation = $this->basicGroup->toNew([new MyClass(), 'myMethod']);
125
126 $this->assertInstanceOf(NewMethodTransformation::class, $transformation);
127 }
◆ testNewMethodTransformationThrowsExceptionBecauseToFewParametersAreGiven()
ILIAS\Tests\Refinery\To\GroupTest::testNewMethodTransformationThrowsExceptionBecauseToFewParametersAreGiven |
( |
| ) |
|
Definition at line 142 of file GroupTest.php.
142 : void
143 {
144 $this->expectNotToPerformAssertions();
145
146 try {
147 $transformation = $this->basicGroup->toNew([new MyClass()]);
148 } catch (InvalidArgumentException $exception) {
149 return;
150 }
151
152 $this->fail();
153 }
◆ testNewMethodTransformationThrowsExceptionBecauseToManyParametersAreGiven()
ILIAS\Tests\Refinery\To\GroupTest::testNewMethodTransformationThrowsExceptionBecauseToManyParametersAreGiven |
( |
| ) |
|
Definition at line 129 of file GroupTest.php.
129 : void
130 {
131 $this->expectNotToPerformAssertions();
132
133 try {
134 $transformation = $this->basicGroup->toNew([new MyClass(), 'myMethod', 'hello']);
135 } catch (InvalidArgumentException $exception) {
136 return;
137 }
138
139 $this->fail();
140 }
◆ testNewObjectTransformation()
ILIAS\Tests\Refinery\To\GroupTest::testNewObjectTransformation |
( |
| ) |
|
- Exceptions
-
ilException
Definition at line 112 of file GroupTest.php.
112 : void
113 {
114 $transformation = $this->basicGroup->toNew(MyClass::class);
115
116 $this->assertInstanceOf(NewObjectTransformation::class, $transformation);
117 }
◆ testRecordOfTransformation()
ILIAS\Tests\Refinery\To\GroupTest::testRecordOfTransformation |
( |
| ) |
|
- Exceptions
-
ilException
Definition at line 95 of file GroupTest.php.
95 : void
96 {
97 $transformation = $this->basicGroup->recordOf(['toString' => new StringTransformation()]);
98
99 $this->assertInstanceOf(RecordTransformation::class, $transformation);
100 }
◆ testTupleOfTransformation()
ILIAS\Tests\Refinery\To\GroupTest::testTupleOfTransformation |
( |
| ) |
|
Definition at line 85 of file GroupTest.php.
85 : void
86 {
87 $transformation = $this->basicGroup->tupleOf([new StringTransformation()]);
88
89 $this->assertInstanceOf(TupleTransformation::class, $transformation);
90 }
◆ $basicGroup
ToGroup ILIAS\Tests\Refinery\To\GroupTest::$basicGroup |
|
private |
The documentation for this class was generated from the following file: