Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\SerializerPassTest::testThrowExceptionWhenNoNormalizers PHP Method

testThrowExceptionWhenNoNormalizers() public method

    public function testThrowExceptionWhenNoNormalizers()
    {
        $container = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds'))->getMock();
        $container->expects($this->once())->method('hasDefinition')->with('serializer')->will($this->returnValue(true));
        $container->expects($this->once())->method('findTaggedServiceIds')->with('serializer.normalizer')->will($this->returnValue(array()));
        $this->setExpectedException('RuntimeException');
        $serializerPass = new SerializerPass();
        $serializerPass->process($container);
    }