public function MigrateMessageTest::testMessagesTeed in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/migrate/src/Tests/MigrateMessageTest.php \Drupal\migrate\Tests\MigrateMessageTest::testMessagesTeed()
Tests migration interruptions.
File
- core/
modules/ migrate/ src/ Tests/ MigrateMessageTest.php, line 96 - Contains \Drupal\migrate\Tests\MigrateMessageTest.
Class
- MigrateMessageTest
- Test whether idmap messages are sent to the message interface when requested.
Namespace
Drupal\migrate\TestsCode
public function testMessagesTeed() {
// Ask to receive any messages sent to the idmap.
\Drupal::service('event_dispatcher')
->addListener(MigrateEvents::IDMAP_MESSAGE, array(
$this,
'mapMessageRecorder',
));
$executable = new MigrateExecutable($this->migration, $this);
$executable
->import();
$this
->assertIdentical(count($this->messages), 1);
$this
->assertIdentical(reset($this->messages), "source_message: 'a message' is not an array");
}