8000 [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
Removed useless test
  • Loading branch information
xavismeh committed Jan 13, 2016
commit 467a04914e8b97611b901f1002dbe8b4aa4ec6bb
Original file line number Diff line number Diff line change
Expand Up @@ -422,27 +422,6 @@ public function testAssociatedEntityWithNull()
$this->assertNoViolation();
}

public function testAssociatedCompositeEntity()
{
$constraint = new UniqueEntity(array(
'message' => 'myMessage',
'fields' => array('composite'),
'em' => self::EM_NAME,
));

$composite = new CompositeIntIdEntity(1, 1, 'test');
$associated = new AssociationEntity();
$associated->composite = $composite;

$this->em->persist($composite);
$this->em->persist($associated);
$this->em->flush();

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

$this->assertNoViolation();
}

/**
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException
* @expectedExceptionMessage Object manager "foo" does not exist.
Expand Down
0