public function TestRevisionHandler::testCheckUpdates in Feeds Paragraphs 8
@covers ::checkUpdates
File
- tests/
src/ Unit/ TestRevisionHandler.php, line 90
Class
- TestRevisionHandler
- @group Feeds Paragraphs @coversDefaultClass \Drupal\feeds_para_mapper\RevisionHandler
Namespace
Drupal\Tests\feeds_para_mapper\UnitCode
public function testCheckUpdates() {
$revHandler = $this
->getMockBuilder(RevisionHandler::class)
->disableOriginalConstructor()
->setMethods([
'createRevision',
])
->getMock();
$revHandler
->expects($this
->atLeastOnce())
->method('createRevision');
$method = $this
->getMethod($revHandler, 'checkUpdates');
$paragraph = end($this->entityHelper->paragraphs);
$paragraph
->isNew()
->willReturn(false);
$method
->invokeArgs($revHandler, array(
array(
$paragraph
->reveal(),
),
));
}