2 declare(strict_types = 1);
20 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
53 $classValues = $service->getClassTagsValues(static::class);
55 'see' => [
'test for reflection'],
56 'link' => [
'second test for reflection',
'second test for reflection with second value']
61 $service->getClassTagsValues(
'NonExistantNamespace\\NonExistantClass')
71 $classValues = $service->getClassTagValues(static::class,
'see');
73 'test for reflection',
78 $service->getClassTagValues(static::class,
'nonExistantTag')
83 $service->getClassTagValues(
'NonExistantNamespace\\NonExistantClass',
'nonExistantTag')
93 $this->assertTrue($service->hasMethod(static::class,
'fixtureMethodForMethodTagsValues'));
94 $this->assertFalse($service->hasMethod(static::class,
'notExistentMethod'));
95 $this->assertFalse($service->hasMethod(
'NonExistantNamespace\\NonExistantClass',
'notExistentMethod'));
104 $tagsValues = $service->getMethodTagsValues(static::class,
'fixtureMethodForMethodTagsValues');
105 $this->assertEquals([
106 'param' => [
'array $foo The foo parameter'],
107 'return' => [
'string']
112 $service->getMethodTagsValues(static::class,
'notExistentMethod')
117 $service->getMethodTagsValues(
'NonExistantNamespace\\NonExistantClass',
'notExistentMethod')
127 $parameters = $service->getMethodParameters(static::class,
'fixtureMethodForMethodTagsValues');
131 'byReference' =>
false,
134 'allowsNull' =>
false,
139 'hasDefaultValue' =>
false,
140 'defaultValue' =>
null,
141 'dependency' =>
null,
148 $service->getMethodParameters(static::class,
'notExistentMethod')
153 $service->getMethodParameters(
'NonExistantNamespace\\NonExistantClass',
'notExistentMethod')
163 $parameters = $service->getMethodParameters(static::class,
'fixtureMethodForMethodTagsValuesWithShortTypes');
167 'byReference' =>
false,
170 'allowsNull' =>
true,
175 'hasDefaultValue' =>
false,
176 'defaultValue' =>
null,
177 'dependency' =>
null,
182 'byReference' =>
false,
185 'allowsNull' =>
true,
190 'hasDefaultValue' =>
false,
191 'defaultValue' =>
null,
192 'dependency' =>
null,
201 $this->assertTrue($service->isClassTaggedWith(
202 Fixture\DummyClassWithTags::class,
206 $this->assertFalse($service->isClassTaggedWith(
207 Fixture\DummyClassWithAllTypesOfProperties::class,
211 $this->assertFalse($service->isClassTaggedWith(
212 'NonExistantNamespace\\NonExistantClass',
220 $this->assertTrue($service->isPropertyTaggedWith(
221 Fixture\DummyClassWithAllTypesOfProperties::class,
222 'propertyWithInjectAnnotation',
226 $this->assertFalse($service->isPropertyTaggedWith(
227 Fixture\DummyClassWithAllTypesOfProperties::class,
228 'propertyWithInjectAnnotation',
232 $this->assertFalse($service->isPropertyTaggedWith(
233 Fixture\DummyClassWithAllTypesOfProperties::class,
234 'nonExistantProperty',
238 $this->assertFalse($service->isPropertyTaggedWith(
239 'NonExistantNamespace\\NonExistantClass',
240 'propertyWithInjectAnnotation',
250 $service->getPropertyTagValues(
251 Fixture\DummyClassWithAllTypesOfProperties::class,
252 'propertyWithInjectAnnotation',
259 $service->getPropertyTagValues(
260 Fixture\DummyClassWithAllTypesOfProperties::class,
261 'propertyWithInjectAnnotation',
274 'DummyClassWithAllTypesOfProperties'
277 $service->getPropertyTagsValues(
278 Fixture\DummyClassWithAllTypesOfProperties::class,
279 'propertyWithInjectAnnotation'
285 $service->getPropertyTagsValues(
286 Fixture\DummyClassWithAllTypesOfProperties::class,
287 'nonExistantProperty'
293 $service->getPropertyTagsValues(
294 'NonExistantNamespace\\NonExistantClass',
295 'nonExistantProperty'
308 'publicStaticProperty',
309 'protectedStaticProperty',
310 'privateStaticProperty',
311 'propertyWithIgnoredTags',
312 'propertyWithInjectAnnotation',
313 'propertyWithTransientAnnotation',
314 'propertyWithCascadeAnnotation',
315 'propertyWithCascadeAnnotationWithoutVarAnnotation',
316 'propertyWithObjectStorageAnnotation'
318 $service->getClassPropertyNames(Fixture\DummyClassWithAllTypesOfProperties::class)
323 $service->getClassPropertyNames(
'NonExistantNamespace\\NonExistantClass')