Skip to content

Commit

Permalink
Fixed unittest of EntityMutationMetadataProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Utama committed Sep 24, 2015
1 parent 153d618 commit d728833
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 d728833

Please sign in to comment.