8000 bug #16033 [Form] made the tests compatible with 3.0 (fabpot) · symfony/symfony@fdb2073 · GitHub
[go: up one dir, main page]

Skip to content

Commit fdb2073

Browse files
committed
bug #16033 [Form] made the tests compatible with 3.0 (fabpot)
This PR was merged into the 2.8 branch. Discussion ---------- [Form] made the tests compatible with 3.0 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 795da85 [Form] made the tests compatible with 3.0
2 parents 08c5b3f + 795da85 commit fdb2073

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
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/ValidatorExtensionTest.php

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

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