Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5eeb754

Browse files
committed
Move Constraint validator test case to Test namespace
1 parent c55baba commit 5eeb754

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+115
-49
lines changed

UPGRADE-3.1.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
UPGRADE FROM 3.0 to 3.1
22
=======================
33

4+
<<<<<<< HEAD
45
DependencyInjection
56
-------------------
67

@@ -73,10 +74,17 @@ Yaml
7374

7475
* Deprecated support for passing `true`/`false` as the fourth argument to the
7576
`parse()` method to parse objects as maps.
77+
=======
78+
### Validator
79+
80+
* `Tests\Constraints\AbstractConstraintValidatorTest` has been removed in
81+
favor of `Test\ConstraintValidatorTestCase`.
82+
>>>>>>> Move Constraint validator test case to Test namespace
7683
7784
Before:
7885

7986
```php
87+
<<<<<<< HEAD
8088
Yaml::parse('{ "foo": "bar", "fiz": "cat" }', false, false, true);
8189
```
8290

@@ -93,11 +101,21 @@ Yaml
93101

94102
```php
95103
Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, true);
104+
=======
105+
// ...
106+
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
107+
108+
class MyCustomValidatorTest extends AbstractConstraintValidatorTest
109+
{
110+
// ...
111+
}
112+
>>>>>>> Move Constraint validator test case to Test namespace
96113
```
97114

98115
After:
99116

100117
```php
118+
<<<<<<< HEAD
101119
Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE);
102120
```
103121

@@ -117,3 +135,13 @@ Yaml
117135

118136
* The `!!php/object` tag to indicate dumped PHP objects has been deprecated
119137
and will be removed in Symfony 4.0. Use the `!php/object` tag instead.
138+
=======
139+
// ...
140+
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
141+
142+
class MyCustomValidatorTest extends ConstraintValidatorTestCase
143+
{
144+
// ...
145+
}
146+
```
147+
>>>>>>> Move Constraint validator test case to Test namespace

src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
use Symfony\Bridge\Doctrine\Tests\Fixtures\AssociationEntity;
2222
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
2323
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator;
24-
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
24+
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
2525
use Doctrine\ORM\Tools\SchemaTool;
2626

2727
/**
2828
* @author Bernhard Schussek <[email protected]>
2929
*/
30-
class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
30+
class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
3131
{
3232
const EM_NAME = 'foo';
3333

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"symfony/property-info": "~2.8|3.0",
2929
"symfony/security": "~2.8|~3.0",
3030
"symfony/expression-language": "~2.8|~3.0",
31-
"symfony/validator": "~2.8|~3.0",
31+
"symfony/validator": "~3.1",
3232
"symfony/translation": "~2.8|~3.0",
3333
"doctrine/data-fixtures": "1.0.*",
3434
"doctrine/dbal": "~2.4",

src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
use Symfony\Component\Validator\Constraints\NotNull;
2222
use Symfony\Component\Validator\Constraints\NotBlank;
2323
use Symfony\Component\Validator\Constraints\Valid;
24-
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
24+
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
2525

2626
/**
2727
* @author Bernhard Schussek <[email protected]>
2828
*/
29-
class FormValidatorTest extends AbstractConstraintValidatorTest
29+
class FormValidatorTest extends ConstraintValidatorTestCase
3030
{
3131
/**
3232
* @var \PHPUnit_Framework_MockObject_MockObject

src/Symfony/Component/Form/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"require-dev": {
2727
"doctrine/collections": "~1.0",
28-
"symfony/validator": "~2.8|~3.0",
28+
"symfony/validator": "~3.1",
2929
"symfony/dependency-injection": "~2.8|~3.0",
3030
"symfony/http-foundation": "~2.8|~3.0",
3131
"symfony/http-kernel": "~2.8|~3.0",

src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
1717
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
1818
use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator;
19-
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
19+
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
2020

2121
/**
2222
* @author Bernhard Schussek <[email protected]>
2323
*/
24-
abstract class UserPasswordValidatorTest extends AbstractConstraintValidatorTest
24+
abstract class UserPasswordValidatorTest extends ConstraintValidatorTestCase
2525
{
2626
const PASSWORD = 's3Cr3t';
2727

src/Symfony/Component/Security/Core/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"symfony/expression-language": "~2.8|~3.0",
2626
"symfony/http-foundation": "~2.8|~3.0",
2727
"symfony/ldap": "~3.1",
28-
"symfony/validator": "~2.8|~3.0",
28+
"symfony/validator": "~3.1",
2929
"psr/log": "~1.0"
3030
},
3131
"suggest": {

src/Symfony/Component/Security/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"symfony/finder": "~2.8|~3.0",
3636
"symfony/polyfill-intl-icu": "~1.0",
3737
"symfony/routing": "~2.8|~3.0",
38-
"symfony/validator": "~2.8|~3.0",
38+
"symfony/validator": "~3.1",
3939
"symfony/expression-language": "~2.8|~3.0",
4040
"symfony/ldap": "~3.1",
4141
"psr/log": "~1.0"

src/Symfony/Component/Validator/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
CHANGELOG
22
=========
33

4+
* removed `Tests\Constraints\AbstractContraintValidatorTest` in favor of `Test\ConstraintValidatorTestCase`
5+
46
2.8.0
57
-----
68

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Validator\Tests\Constraints;
12+
namespace Symfony\Component\Validator\Test;
1313

1414
use Symfony\Component\Validator\Constraint;
1515
use Symfony\Component\Validator\Constraints\NotNull;
@@ -21,11 +21,11 @@
2121
use Symfony\Component\Validator\Mapping\PropertyMetadata;
2222

2323
/**
24-
* @since 2.5.3
24+
* A test case to ease testing Constraint Validators.
2525
*
2626
* @author Bernhard Schussek <[email protected]>
2727
*/
28-
abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_TestCase
28+
abstract class ConstraintValidatorTestCase extends \PHPUnit_Framework_TestCase
2929
{
3030
/**
3131
* @var ExecutionContextInterface

0 commit comments

Comments
 (0)