public function DocParserTest::getAnnotationVarTypeProviderValid in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php \Drupal\Tests\Component\Annotation\Doctrine\DocParserTest::getAnnotationVarTypeProviderValid()
File
- core/
tests/ Drupal/ Tests/ Component/ Annotation/ Doctrine/ DocParserTest.php, line 399
Class
- DocParserTest
- @coversDefaultClass \Drupal\Component\Annotation\Doctrine\DocParser
Namespace
Drupal\Tests\Component\Annotation\DoctrineCode
public function getAnnotationVarTypeProviderValid() {
//({attribute name}, {attribute value})
return array(
// mixed type
array(
'mixed',
'"String Value"',
),
array(
'mixed',
'true',
),
array(
'mixed',
'false',
),
array(
'mixed',
'1',
),
array(
'mixed',
'1.2',
),
array(
'mixed',
'@Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll',
),
// boolean type
array(
'boolean',
'true',
),
array(
'boolean',
'false',
),
// alias for internal type boolean
array(
'bool',
'true',
),
array(
'bool',
'false',
),
// integer type
array(
'integer',
'0',
),
array(
'integer',
'1',
),
array(
'integer',
'123456789',
),
array(
'integer',
'9223372036854775807',
),
// alias for internal type double
array(
'float',
'0.1',
),
array(
'float',
'1.2',
),
array(
'float',
'123.456',
),
// string type
array(
'string',
'"String Value"',
),
array(
'string',
'"true"',
),
array(
'string',
'"123"',
),
// array type
array(
'array',
'{@AnnotationExtendsAnnotationTargetAll}',
),
array(
'array',
'{@AnnotationExtendsAnnotationTargetAll,@AnnotationExtendsAnnotationTargetAll}',
),
array(
'arrayOfIntegers',
'1',
),
array(
'arrayOfIntegers',
'{1}',
),
array(
'arrayOfIntegers',
'{1,2,3,4}',
),
array(
'arrayOfAnnotations',
'@AnnotationExtendsAnnotationTargetAll',
),
array(
'arrayOfAnnotations',
'{@Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll}',
),
array(
'arrayOfAnnotations',
'{@AnnotationExtendsAnnotationTargetAll, @Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll}',
),
// annotation instance
array(
'annotation',
'@Drupal\\Tests\\Component\\Annotation\\Doctrine\\Fixtures\\AnnotationTargetAll',
),
array(
'annotation',
'@AnnotationExtendsAnnotationTargetAll',
),
);
}