Skip to content

Commit cbf1f77

Browse files
committed
Move Constraint validator test case to Test namespace
1 parent eed17e9 commit cbf1f77

File tree

55 files changed

+464
-407
lines changed

Some content is hidden

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

55 files changed

+464
-407
lines changed

UPGRADE-4.0.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
UPGRADE FROM 3.x to 4.0
2+
=======================
3+
4+
### Validator
5+
6+
* `Tests\Constraints\AbstractConstraintValidatorTest` has been removed in
7+
favor of `Test\ConstraintValidatorTestCase`.
8+
9+
Before:
10+
11+
```php
12+
// ...
13+
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
14+
15+
class MyCustomValidatorTest extends AbstractConstraintValidatorTest
16+
{
17+
// ...
18+
}
19+
```
20+
21+
After:
22+
23+
```php
24+
// ...
25+
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
26+
27+
class MyCustomValidatorTest extends ConstraintValidatorTestCase
28+
{
29+
// ...
30+
}
31+
```

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 <bschussek@gmail.com>
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 <bschussek@gmail.com>
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 <bschussek@gmail.com>
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": "~2.8|~3.0",
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": "~2.8|~3.0",
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+
* deprecated `Tests\Constraints\AbstractContraintValidatorTest` in favor of `Test\ConstraintValidatorTestCase`
5+
46
2.8.0
57
-----
68

0 commit comments

Comments
 (0)