PropertyInfoTest.php 943 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
  11. use Symfony\Component\PropertyInfo\Type;
  12. class PropertyInfoTest extends WebTestCase
  13. {
  14. public function testPhpDocPriority()
  15. {
  16. static::bootKernel(array('test_case' => 'Serializer'));
  17. $container = static::$kernel->getContainer();
  18. $this->assertEquals(array(new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_INT))), $container->get('property_info')->getTypes('Symfony\Bundle\FrameworkBundle\Tests\Functional\Dummy', 'codes'));
  19. }
  20. }
  21. class Dummy
  22. {
  23. /**
  24. * @param int[] $codes
  25. */
  26. public function setCodes(array $codes)
  27. {
  28. }
  29. }