Added the Search API Synonym module to deal specifically with licence and license...
[yaffs-website] / vendor / symfony / dependency-injection / Tests / LazyProxy / Instantiator / RealServiceInstantiatorTest.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\LazyProxy\Instantiator;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\DependencyInjection\Definition;
16 use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator;
17
18 /**
19  * Tests for {@see \Symfony\Component\DependencyInjection\Instantiator\RealServiceInstantiator}.
20  *
21  * @author Marco Pivetta <ocramius@gmail.com>
22  */
23 class RealServiceInstantiatorTest extends TestCase
24 {
25     public function testInstantiateProxy()
26     {
27         $instantiator = new RealServiceInstantiator();
28         $instance = new \stdClass();
29         $container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();
30         $callback = function () use ($instance) {
31             return $instance;
32         };
33
34         $this->assertSame($instance, $instantiator->instantiateProxy($container, new Definition(), 'foo', $callback));
35     }
36 }