// We don't ask for messages to be teed, so don't expect any.
$executable =
new MigrateExecutable($this->migration,
$this);
$executable->
import();
$this->
assertCount(0,
$this->messages
);
} /**
* Tests migration interruptions.
*/
public function testMessagesTeed() { // Ask to receive any messages sent to the idmap.
\Drupal::
service('event_dispatcher'
)->
addListener(MigrateEvents::IDMAP_MESSAGE,
[$this, 'mapMessageRecorder'
]);
$executable =
new MigrateExecutable($this->migration,
$this);
$executable->
import();
$this->
assertCount(1,
$this->messages
);
$id =
$this->migration->
getPluginId();
$this->
assertSame("source_message:
$id:message:concat: 'a message' is not an array",
reset($this->messages
));
} /**
* Tests the return value of getMessages().
*
* This method returns an iterator of StdClass objects. Check that these
* objects have the expected keys.
*/