8000 Merge branch '2.8' · symfony/symfony@77da8ad · GitHub
[go: up one dir, main page]

Skip to content

Commit 77da8ad

Browse files
committed
Merge branch '2.8'
* 2.8: [Form] made the tests compatible with 3.0
2 parents a3b921d + fdb2073 commit 77da8ad

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\Form\Guess\ValueGuess;
1818
use Symfony\Component\Validator\Constraint;
1919
use Symfony\Component\Validator\Mapping\ClassMetadataInterface;
20-
use Symfony\Component\Validator\MetadataFactoryInterface;
20+
use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface;
2121

2222
class ValidatorTypeGuesser implements FormTypeGuesserInterface
2323
{

src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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';

src/Symfony/Component/Form/Tests/Extension/Validator/Type/TypeTestCase.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)
0