From d72883326d5145e2a98830e3eaedf15192f7aec7 Mon Sep 17 00:00:00 2001 From: Nathan Utama Date: Thu, 24 Sep 2015 10:59:28 +0200 Subject: [PATCH] Fixed unittest of EntityMutationMetadataProvider --- test/Provider/EntityMutationMetadataProviderTest.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/test/Provider/EntityMutationMetadataProviderTest.php b/test/Provider/EntityMutationMetadataProviderTest.php index d74c0cf..be97aad 100644 --- a/test/Provider/EntityMutationMetadataProviderTest.php +++ b/test/Provider/EntityMutationMetadataProviderTest.php @@ -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); @@ -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));