Skip to content

Commit

Permalink
EZP-30417: Add notifications to the password reset view (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
czechmarcin authored and lserwatka committed May 15, 2019
1 parent 155391e commit 4ebe8f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/Validator/Constraints/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use Symfony\Component\Validator\Constraint;

/**
* @Annotation
*/
class Password extends Constraint
{
/** @var string */
Expand All @@ -17,8 +20,8 @@ class Password extends Constraint
/**
* {@inheritdoc}
*/
public function getTargets(): string
public function getTargets(): array
{
return self::CLASS_CONSTRAINT;
return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public function testValidatedBy()

public function testGetTargets()
{
$this->assertSame(Password::CLASS_CONSTRAINT, $this->constraint->getTargets());
$this->assertSame([Password::CLASS_CONSTRAINT, Password::PROPERTY_CONSTRAINT], $this->constraint->getTargets());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public function testValidatedBy()

public function testGetTargets()
{
$this->assertSame(UserAccountPassword::CLASS_CONSTRAINT, $this->constraint->getTargets());
$this->assertSame([UserAccountPassword::CLASS_CONSTRAINT, UserAccountPassword::PROPERTY_CONSTRAINT], $this->constraint->getTargets());
}
}

0 comments on commit 4ebe8f4

Please # to comment.