Skip to content

Commit

Permalink
update broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaidas Bagdonas committed Feb 18, 2020
1 parent 9ddcb5d commit f8fdd24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ public function process($sObject)
}

$allowedProperties = $this->getAllowedProperties($this->documentClassName);
$this->documentUpdater->updateWithDocument($mappedDocument, $existingDocument, null, $allowedProperties);
if(count($allowedProperties) > 0) {
$this->documentUpdater->updateWithDocument($mappedDocument, $existingDocument, null, $allowedProperties);
}

$beforeFlushEvent = $this->outboundMessageBeforeFlushEventBuilder->build($mappedDocument, $existingDocument);
$this->eventDispatcher->dispatch(OutboundMessageBeforeFlushEvent::NAME, $beforeFlushEvent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function testNotificationsSuccessfulOnExistingDocument()
->willReturn($unitOfWorkMock);

$mappedDocumentMock = $this->createMock(Product::class);
$mappedDocumentMock->expects($this->atLeastOnce())
$mappedDocumentMock->expects($this->once())
->method('getId')
->willReturn('897D6FGSD');

Expand Down Expand Up @@ -193,7 +193,7 @@ public function testNotificationsSuccessfulOnNewDocument()
->willReturn($unitOfWorkMock);

$mappedDocumentMock = $this->createMock(Product::class);
$mappedDocumentMock->expects($this->atLeastOnce())
$mappedDocumentMock->expects($this->once())
->method('getId')
->willReturn('897D6FGSD');

Expand Down Expand Up @@ -251,7 +251,7 @@ public function testNotificationsSkipSuccessful()
->willReturn($unitOfWorkMock);

$mappedDocumentMock = $this->createMock(Product::class);
$mappedDocumentMock->expects($this->atLeastOnce())
$mappedDocumentMock->expects($this->once())
->method('getId')
->willReturn('897D6FGSD');

Expand Down

0 comments on commit f8fdd24

Please sign in to comment.