10000 [DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument by xavismeh · Pull Request #17355 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument #17355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed tests
  • Loading branch information
xavismeh committed Jan 13, 2016
commit b901bb150b2f6f462558e79e5206a2321ea4dcb2
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public function testAssociatedEntity()

$this->buildViolation('myMessage')
->atPath('property.path.single')
->setInvalidValue(1)
->setInvalidValue($entity1)
->assertRaised();
}

Expand All @@ -422,10 +422,6 @@ public function testAssociatedEntityWithNull()
$this->assertNoViolation();
}

/**
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException
* @expectedExceptionMessage Associated entities are not allowed to have more than one identifier field
*/
public function testAssociatedCompositeEntity()
{
$constraint = new UniqueEntity(array(
Expand All @@ -443,6 +439,8 @@ public function testAssociatedCompositeEntity()
$this->em->flush();

$this->validator->validate($associated, $constraint);

$this->assertNoViolation();
}

/**
Expand Down
0