diff --git a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php index f610a7deb8..88ea9b158e 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php +++ b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php @@ -17,7 +17,7 @@ use Symfony\Component\Form\Guess\TypeGuess; use Symfony\Component\Form\Guess\ValueGuess; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Mapping\ClassMetadataInterface; -use Symfony\Component\Validator\MetadataFactoryInterface; +use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; class ValidatorTypeGuesser implements FormTypeGuesserInterface { diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php index ff08e8ea54..788b8a082b 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php @@ -56,7 +56,7 @@ class ValidationListenerTest extends \PHPUnit_Framework_TestCase { $this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); - $this->validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface'); + $this->validator = $this->getMock('Symfony\Component\Validator\Validator\ValidatorInterface'); $this->violationMapper = $this->getMock('Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapperInterface'); $this->listener = new ValidationListener($this->validator, $this->violationMapper); $this->message = 'Message'; diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php index 8ace4d3c3b..19b6c1ca0c 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php @@ -20,11 +20,9 @@ abstract class TypeTestCase extends BaseTypeTestCase protected function setUp() { - $this->validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface'); - $metadataFactory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface'); - $this->validator->expects($this->once())->method('getMetadataFactory')->will($this->returnValue($metadataFactory)); + $this->validator = $this->getMock('Symfony\Component\Validator\Validator\ValidatorInterface'); $metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata')->disableOriginalConstructor()->getMock(); - $metadataFactory->expects($this->once())->method('getMetadataFor')->will($this->returnValue($metadata)); + $this->validator->expects($this->once())->method('getMetadataFor')->will($this->returnValue($metadata)); parent::setUp(); } diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php index 63bf5913a1..64e57fc786 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorExtensionTest.php @@ -53,7 +53,7 @@ class ValidatorExtensionTest extends \PHPUnit_Framework_TestCase */ public function test2Dot4ValidationApi() { - $factory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface'); + $factory = $this->getMock('Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface'); $validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface'); $metadata = $this->getMockBuilder('Symfony\Component\Validator\Mapping\ClassMetadata') ->disableOriginalConstructor() diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php index bd065eeb45..220e6898bd 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php @@ -51,7 +51,7 @@ class ValidatorTypeGuesserTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->metadata = new ClassMetadata(self::TEST_CLASS); - $this->metadataFactory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface'); + $this->metadataFactory = $this->getMock('Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface'); $this->metadataFactory->expects($this->any()) ->method('getMetadataFor') ->with(self::TEST_CLASS)