ReferenceTest.php 742 B

12345678910111213141516171819202122232425
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. namespace Symfony\Tests\Component\DependencyInjection;
  10. use Symfony\Component\DependencyInjection\Reference;
  11. class ReferenceTest extends \PHPUnit_Framework_TestCase
  12. {
  13. /**
  14. * @covers Symfony\Component\DependencyInjection\Reference::__construct
  15. */
  16. public function testConstructor()
  17. {
  18. $ref = new Reference('foo');
  19. $this->assertEquals('foo', (string) $ref, '__construct() sets the id of the reference, which is used for the __toString() method');
  20. }
  21. }