* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Tests\Extension\Validator; use PHPUnit\Framework\TestCase; use Symfony\Component\Form\Extension\Validator\ValidatorExtension; class ValidatorExtensionTest extends TestCase { public function test2Dot5ValidationApi() { $validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\RecursiveValidator') ->disableOriginalConstructor() ->getMock(); $metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata') ->disableOriginalConstructor() ->getMock(); $validator->expects($this->once()) ->method('getMetadataFor') ->with($this->identicalTo('Symfony\Component\Form\Form')) ->will($this->returnValue($metadata)); // Verify that the constraints are added $metadata->expects($this->once()) ->method('addConstraint') ->with($this->isInstanceOf('Symfony\Component\Form\Extension\Validator\Constraints\Form')); $metadata->expects($this->once()) ->method('addPropertyConstraint') ->with('children', $this->isInstanceOf('Symfony\Component\Validator\Constraints\Valid')); $extension = new ValidatorExtension($validator); $guesser = $extension->loadTypeGuesser(); $this->assertInstanceOf('Symfony\Component\Form\Extension\Validator\ValidatorTypeGuesser', $guesser); } } __halt_compiler();----SIGNATURE:----qBKEw4Y7JAEsZNFUMq5I3f8UXBwLifDpccWjMklNhb9BVj4HLSfBti8/0hrVWGPrljQY0wQpAfMyoknsWC1Ker00iHD62+NCVbLgBhWwVJkrGXUripa0OOOQnzljejkCypWmzOzxuXoBtIgclQwED8M0bUQQ4r6eSK4Uw2nJmIGutsg5X2VYwY7HN/c5zxZY8ldMVs15QbCPVgQpj4XLD7VFKsfcR8fhnXYbI2GwyicLSuUNbOEC3TsGdObAoAf2bVH0NG6RCTfHlcClgT98pok5o1cCtSEBZAKH/sa4gGmEMTjes/sBNsEqK/7tZnPC2SQDzH41R5Ckh3jRtHwD8bj0ZmzO/JWYRwnbioCHANW8HmFYxlTpzcvaGLK2ytsBXijvTy0B+ABavGoJ6tWhrzTc9KbmwN9BUFz3THnQydy6O4Z57XloyVOg+ht9zGBV4YUT7Gt4vFBql9E4efFxVCjsGAEAZxEuG6ggzrh8WVPzFs/Kst3D6ph7hh8dGShom2SmL/WcdfFB6ciiDQTir1kSjWHVqTI9pK3J3vw1qXpkZ/tzcqG2XKlyOhv+JPmew7DmR3l4lS3pN2I3BfSXW74cM26NBL4VKui7K1dckh+vWBQ9ppYLobKU3A3OnUdepDZ6PE7tC+TcUKZ+LVdKi9p604YejwBRkZ/p9sjAcF4=----ATTACHMENT:----OTYyMjgxNjc1MTU3NjI4OSA1MjYwMzEzNTQzODU1MTQ1IDQxODQ4NTcyMTA4MDg2OTY=