Skip to content

Commit

Permalink
Merge pull request #22 from nutama/Fixed_broken_unittest
Browse files Browse the repository at this point in the history
Fixed unittest of EntityMutationMetadataProvider
  • Loading branch information
yannickl88 committed Sep 24, 2015
2 parents 153d618 + d728833 commit c70af2e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions test/Provider/EntityMutationMetadataProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function testGetMutatedFieldsOneToOneNotOwning()
$metadata = $this->buildMetadata($entity, [], ['parent']);

$this->em
->expects($this->exactly(2))
->expects($this->once())
->method('getClassMetadata')
->willReturn($metadata);

Expand All @@ -157,13 +157,6 @@ public function testGetMutatedFieldsOneToOneNotOwning()
->method('getAssociationMapping')
->with('parent')
->willReturn(['type' => ClassMetadataInfo::ONE_TO_ONE, 'isOwningSide' => false]);
$metadata
->expects($this->once())
->method('getAssociationTargetClass');
$metadata
->expects($this->exactly(2))
->method('getFieldValue')
->willReturnOnConsecutiveCalls($entity->parent, $original->parent);

$provider = new EntityMutationMetadataProvider($this->reader);
$this->assertCount(0, $provider->getMutatedFields($this->em, $entity, $original));
Expand Down

0 comments on commit c70af2e

Please sign in to comment.