public function DocParserTest::getAnnotationVarTypeProviderValid

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php, line 364

Class

DocParserTest

Namespace

Doctrine\Tests\Common\Annotations

Code

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',
      '@Doctrine\\Tests\\Common\\Annotations\\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',
      '{@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll}',
    ),
    array(
      'arrayOfAnnotations',
      '{@AnnotationExtendsAnnotationTargetAll, @Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll}',
    ),
    // annotation instance
    array(
      'annotation',
      '@Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll',
    ),
    array(
      'annotation',
      '@AnnotationExtendsAnnotationTargetAll',
    ),
  );
}