ParameterTest.php 604 B

123456789101112131415161718192021
  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. require_once __DIR__.'/../../../bootstrap.php';
  10. use Symfony\Components\DependencyInjection\Parameter;
  11. $t = new LimeTest(1);
  12. // __construct() ->__toString()
  13. $t->diag('__construct() ->__toString()');
  14. $ref = new Parameter('foo');
  15. $t->is((string) $ref, 'foo', '__construct() sets the id of the parameter, which is used for the __toString() method');