Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FrameworkBundle] Add annotated validator cache test case
- Loading branch information
1 parent
c60009e
commit e09dccc
Showing
7 changed files
with
79 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Category.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Validation; | ||
|
||
use Symfony\Component\Validator\Constraints as Assert; | ||
|
||
class Category | ||
{ | ||
const NAME_PATTERN = '/\w+/'; | ||
|
||
public $id; | ||
|
||
/** | ||
* @Assert\Type(Category::NAME_PATTERN) | ||
*/ | ||
public $name; | ||
} |
9 changes: 9 additions & 0 deletions
9
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/Resources/categories.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Validation\Category: | ||
properties: | ||
id: | ||
- Type: int | ||
|
||
Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Validation\SubCategory: | ||
properties: | ||
id: | ||
- Type: int |
13 changes: 13 additions & 0 deletions
13
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Validation/SubCategory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Validation; | ||
|
||
// Missing "use" for Assert\Type is on purpose | ||
|
||
class SubCategory extends Category | ||
{ | ||
/** | ||
* @Assert\Type(Category::class) | ||
*/ | ||
public $main; | ||
} |