* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Tests\Compiler; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; class CheckReferenceValidityPassTest extends TestCase { /** * @expectedException \RuntimeException */ public function testProcessDetectsReferenceToAbstractDefinition() { $container = new ContainerBuilder(); $container->register('a')->setAbstract(true); $container->register('b')->addArgument(new Reference('a')); $this->process($container); } public function testProcess() { $container = new ContainerBuilder(); $container->register('a')->addArgument(new Reference('b')); $container->register('b'); $this->process($container); $this->addToAssertionCount(1); } protected function process(ContainerBuilder $container) { $pass = new CheckReferenceValidityPass(); $pass->process($container); } } __halt_compiler();----SIGNATURE:----jGtyBrk5A1E9KDIfz0aR4otsMxgNlFjDafF9qDvva+V9sP+y5N69fPiuGwjUL3lACZKX6aazXm/OGLfk0BJ/RGZDRAXKYxEAjVKCMM8kRsT4WgWGvPHw5gp01Ao7dON0Kj5hsbEifUp20SbMYFfN7PTXfnbNp9baUpCsEZHzqpBIQWY+o4voWEQMeoA+FYea3eKcaQ2UDF97hlxCAnHf81fg9wekae7ptg9NtGTMapVqbYPlOFopf79DoCm/6TlYxqZrDgBZzJOq1RXc8S1ha45o9Go/bIebvOf2vUmBwfNmsgj7VZUXETITq29G4E5txgObnHbzTVrAm9/gVf1XgPDRK1gog5qOXQTo0SKcnrT1UElIj0hWr8oH5MWKYWLmvhpp/jT1L9LDo8uGTJjG+iQt1x1qaTe7s/qBZiEv1d+W1jPCZ+/jRBvBZ6yKBtCp0qpiHbbLjQVeuk5lk28A1eAtk29UilLWWtSJMF7ZIWXpdl/kaBem1bwoOtwn85QJqU2x+RMUgzaHyL3wAugPkptKraXlHeE4gU10TPtlXU2EdAxXZttQO+Z7FlyIZOXjUU9dXsQQOtTMKIEubwDDHPVwA8EH73ZAKTdD1Sp4OopZLEVAN03b9uD9U/1PUPAnigfyNNTTihGHVl8pzgnfFdze060kgT46VUXQJhCVoGg=----ATTACHMENT:----NjE5NTQ1MzM5NjE3Mzk0IDgyMjY4NzY4MTIzOTE3OTMgNjg4Mzk1NzI0NTgxMzk3Mg==