فهرست منبع

[Validator] updated fixtures

Johannes Schmitt 14 سال پیش
والد
کامیت
f2160b2e79

+ 12 - 11
tests/Symfony/Tests/Component/Validator/Fixtures/Entity.php

@@ -5,23 +5,24 @@ namespace Symfony\Tests\Component\Validator\Fixtures;
 require_once __DIR__.'/EntityParent.php';
 require_once __DIR__.'/EntityInterface.php';
 
+use Symfony\Component\Validator\Constraints as Assert;
+
 /**
- * @import("Symfony\Component\Validator\Constraints\*", alias="assert")
  * @Symfony\Tests\Component\Validator\Fixtures\ConstraintA
- * @assert:GroupSequence({"Foo", "Entity"})
+ * @Assert\GroupSequence({"Foo", "Entity"})
  */
 class Entity extends EntityParent implements EntityInterface
 {
     /**
-     * @assert:NotNull
-     * @assert:Min(3)
-     * @assert:All({@assert:NotNull, @assert:Min(3)}),
-     * @assert:All(constraints={@assert:NotNull, @assert:Min(3)})
-     * @assert:Collection(fields={
-     *   "foo" = {@assert:NotNull, @assert:Min(3)},
-     *   "bar" = @assert:Min(5)
+     * @Assert\NotNull
+     * @Assert\Min(3)
+     * @Assert\All({@Assert\NotNull, @Assert\Min(3)}),
+     * @Assert\All(constraints={@Assert\NotNull, @Assert\Min(3)})
+     * @Assert\Collection(fields={
+     *   "foo" = {@Assert\NotNull, @Assert\Min(3)},
+     *   "bar" = @Assert\Min(5)
      * })
-     * @assert:Choice(choices={"A", "B"}, message="Must be one of %choices%")
+     * @Assert\Choice(choices={"A", "B"}, message="Must be one of %choices%")
      */
     protected $firstName;
     protected $lastName;
@@ -40,7 +41,7 @@ class Entity extends EntityParent implements EntityInterface
     }
 
     /**
-     * @assert:NotNull
+     * @Assert\NotNull
      */
     public function getLastName()
     {

+ 3 - 4
tests/Symfony/Tests/Component/Validator/Fixtures/EntityParent.php

@@ -2,16 +2,15 @@
 
 namespace Symfony\Tests\Component\Validator\Fixtures;
 
-/**
- * @import("Symfony\Component\Validator\Constraints\*", alias="assert")
- */
+use Symfony\Component\Validator\Constraints\NotNull;
+
 class EntityParent
 {
     protected $firstName;
     private $internal;
 
     /**
-     * @assert:NotNull
+     * @NotNull
      */
     protected $other;
 }