/**
  * Returns the last constraint which did not match.
  * @return null|\Brickoo\Component\Validation\Constraint\Constraint otherwise null
  */
 public function getFailedConstraint()
 {
     return $this->constraintGroup->getFailedConstraint();
 }
 /**
  * @covers Brickoo\Component\Validation\Constraint\AndOrConstraint::matches
  * @covers Brickoo\Component\Validation\Constraint\AndOrConstraint::removeFailures
  */
 public function testRemoveFailures()
 {
     $andOrConstraint = new AndOrConstraint([$constraint = new IsInternalTypeConstraint("string")]);
     $this->assertFalse($andOrConstraint->matches(12345));
     $this->assertSame($constraint, $andOrConstraint->getFailedConstraint());
     $this->assertTrue($andOrConstraint->matches("success"));
     $this->assertNull($andOrConstraint->getFailedConstraint());
 }