File tree 4 files changed +5
-7
lines changed
src/Symfony/Component/Form
Tests/Extension/Validator 4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 17
17
use Symfony \Component \Form \Guess \ValueGuess ;
18
18
use Symfony \Component \Validator \Constraint ;
19
19
use Symfony \Component \Validator \Mapping \ClassMetadataInterface ;
20
- use Symfony \Component \Validator \MetadataFactoryInterface ;
20
+ use Symfony \Component \Validator \Mapping \ Factory \ MetadataFactoryInterface ;
21
21
22
22
class ValidatorTypeGuesser implements FormTypeGuesserInterface
23
23
{
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ protected function setUp()
56
56
{
57
57
$ this ->dispatcher = $ this ->getMock ('Symfony\Component\EventDispatcher\EventDispatcherInterface ' );
58
58
$ 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 ' );
60
60
$ this ->violationMapper = $ this ->getMock ('Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapperInterface ' );
61
61
$ this ->listener = new ValidationListener ($ this ->validator , $ this ->violationMapper );
62
62
$ this ->message = 'Message ' ;
Original file line number Diff line number Diff line change @@ -20,11 +20,9 @@ abstract class TypeTestCase extends BaseTypeTestCase
20
20
21
21
protected function setUp ()
22
22
{
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 ' );
26
24
$ 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 ));
28
26
29
27
parent ::setUp ();
30
28
}
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class ValidatorTypeGuesserTest extends \PHPUnit_Framework_TestCase
51
51
protected function setUp ()
52
52
{
53
53
$ 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 ' );
55
55
$ this ->metadataFactory ->expects ($ this ->any ())
56
56
->method ('getMetadataFor ' )
57
57
->with (self ::TEST_CLASS )
You can’t perform that action at this time.
0 commit comments