Yaffs site version 1.1
[yaffs-website] / vendor / symfony / dependency-injection / Tests / ReferenceTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\DependencyInjection\Tests;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\DependencyInjection\Reference;
16
17 class ReferenceTest extends TestCase
18 {
19     public function testConstructor()
20     {
21         $ref = new Reference('foo');
22         $this->assertEquals('foo', (string) $ref, '__construct() sets the id of the reference, which is used for the __toString() method');
23     }
24
25     public function testCaseInsensitive()
26     {
27         $ref = new Reference('FooBar');
28         $this->assertEquals('foobar', (string) $ref, 'the id is lowercased as the container is case insensitive');
29     }
30 }