File tree Expand file tree Collapse file tree 5 files changed +6
-8
lines changed
Tests/Extension/Validator Expand file tree Collapse file tree 5 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1717use Symfony \Component \Form \Guess \ValueGuess ;
1818use Symfony \Component \Validator \Constraint ;
1919use Symfony \Component \Validator \Mapping \ClassMetadataInterface ;
20- use Symfony \Component \Validator \MetadataFactoryInterface ;
20+ use Symfony \Component \Validator \Mapping \ Factory \ MetadataFactoryInterface ;
2121
2222class ValidatorTypeGuesser implements FormTypeGuesserInterface
2323{
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ protected function setUp()
5656 {
5757 $ this ->dispatcher = $ this ->getMock ('Symfony\Component\EventDispatcher\EventDispatcherInterface ' );
5858 $ this ->factory = $ this ->getMock ('Symfony\Component\Form\FormFactoryInterface ' );
59- $ this ->validator = $ this ->getMock ('Symfony\Component\Validator\ValidatorInterface ' );
59+ $ this ->validator = $ this ->getMock ('Symfony\Component\Validator\Validator\ ValidatorInterface ' );
6060 $ this ->violationMapper = $ this ->getMock ('Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapperInterface ' );
6161 $ this ->listener = new ValidationListener ($ this ->validator , $ this ->violationMapper );
6262 $ this ->message = 'Message ' ;
Original file line number Diff line number Diff line change @@ -20,11 +20,9 @@ abstract class TypeTestCase extends BaseTypeTestCase
2020
2121 protected function setUp ()
2222 {
23- $ this ->validator = $ this ->getMock ('Symfony\Component\Validator\ValidatorInterface ' );
24- $ metadataFactory = $ this ->getMock ('Symfony\Component\Validator\MetadataFactoryInterface ' );
25- $ this ->validator ->expects ($ this ->once ())->method ('getMetadataFactory ' )->will ($ this ->returnValue ($ metadataFactory ));
23+ $ this ->validator = $ this ->getMock ('Symfony\Component\Validator\Validator\ValidatorInterface ' );
2624 $ metadata = $ this ->getMockBuilder ('Symfony\Component\Validator\Mapping\ClassMetadata ' )->disableOriginalConstructor ()->getMock ();
27- $ metadataFactory ->expects ($ this ->once ())->method ('getMetadataFor ' )->will ($ this ->returnValue ($ metadata ));
25+ $ this -> validator ->expects ($ this ->once ())->method ('getMetadataFor ' )->will ($ this ->returnValue ($ metadata ));
2826
2927 parent ::setUp ();
3028 }
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public function test2Dot5ValidationApi()
5353 */
5454 public function test2Dot4ValidationApi ()
5555 {
56- $ factory = $ this ->getMock ('Symfony\Component\Validator\MetadataFactoryInterface ' );
56+ $ factory = $ this ->getMock ('Symfony\Component\Validator\Mapping\Factory\ MetadataFactoryInterface ' );
5757 $ validator = $ this ->getMock ('Symfony\Component\Validator\ValidatorInterface ' );
5858 $ metadata = $ this ->getMockBuilder ('Symfony\Component\Validator\Mapping\ClassMetadata ' )
5959 ->disableOriginalConstructor ()
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class ValidatorTypeGuesserTest extends \PHPUnit_Framework_TestCase
5151 protected function setUp ()
5252 {
5353 $ this ->metadata = new ClassMetadata (self ::TEST_CLASS );
54- $ this ->metadataFactory = $ this ->getMock ('Symfony\Component\Validator\MetadataFactoryInterface ' );
54+ $ this ->metadataFactory = $ this ->getMock ('Symfony\Component\Validator\Mapping\Factory\ MetadataFactoryInterface ' );
5555 $ this ->metadataFactory ->expects ($ this ->any ())
5656 ->method ('getMetadataFor ' )
5757 ->with (self ::TEST_CLASS )
You can’t perform that action at this time.
0 commit comments