diff core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php	Thu Feb 28 13:21:36 2019 +0000
@@ -95,9 +95,9 @@
       ->will($this->returnValue(['id' => 'test']));
 
     $this->idMap->expects($this->once())
-      ->method('lookupDestinationId')
+      ->method('lookupDestinationIds')
       ->with(['id' => 'test'])
-      ->will($this->returnValue(['test']));
+      ->will($this->returnValue([['test']]));
 
     $source->expects($this->once())
       ->method('current')
@@ -137,9 +137,9 @@
       ->will($this->returnValue(['id' => 'test']));
 
     $this->idMap->expects($this->once())
-      ->method('lookupDestinationId')
+      ->method('lookupDestinationIds')
       ->with(['id' => 'test'])
-      ->will($this->returnValue(['test']));
+      ->will($this->returnValue([['test']]));
 
     $source->expects($this->once())
       ->method('current')
@@ -213,9 +213,9 @@
       ->method('saveMessage');
 
     $this->idMap->expects($this->once())
-      ->method('lookupDestinationId')
+      ->method('lookupDestinationIds')
       ->with(['id' => 'test'])
-      ->will($this->returnValue(['test']));
+      ->will($this->returnValue([['test']]));
 
     $this->message->expects($this->once())
       ->method('display')
@@ -269,9 +269,9 @@
       ->method('saveMessage');
 
     $this->idMap->expects($this->once())
-      ->method('lookupDestinationId')
+      ->method('lookupDestinationIds')
       ->with(['id' => 'test'])
-      ->will($this->returnValue(['test']));
+      ->will($this->returnValue([['test']]));
 
     $this->assertSame(MigrationInterface::RESULT_COMPLETED, $this->executable->import());
   }
@@ -319,7 +319,7 @@
       ->method('saveMessage');
 
     $this->idMap->expects($this->never())
-      ->method('lookupDestinationId');
+      ->method('lookupDestinationIds');
 
     $this->assertSame(MigrationInterface::RESULT_COMPLETED, $this->executable->import());
   }
@@ -367,9 +367,9 @@
       ->method('saveMessage');
 
     $this->idMap->expects($this->once())
-      ->method('lookupDestinationId')
+      ->method('lookupDestinationIds')
       ->with(['id' => 'test'])
-      ->will($this->returnValue(['test']));
+      ->will($this->returnValue([['test']]));
 
     $this->message->expects($this->once())
       ->method('display')
@@ -384,7 +384,7 @@
   public function testProcessRow() {
     $expected = [
       'test' => 'test destination',
-      'test1' => 'test1 destination'
+      'test1' => 'test1 destination',
     ];
     foreach ($expected as $key => $value) {
       $plugins[$key][0] = $this->getMock('Drupal\migrate\Plugin\MigrateProcessInterface');