3 namespace Drupal\Tests\migrate\Kernel\Plugin;
5 use Drupal\KernelTests\KernelTestBase;
6 use Drupal\migrate\MigrateExecutableInterface;
7 use Drupal\migrate\Row;
10 * Tests the Log process plugin.
14 class LogTest extends KernelTestBase {
19 public static $modules = ['migrate'];
22 * Test the Log plugin.
24 public function testLog() {
25 $plugin = \Drupal::service('plugin.manager.migrate.process')
26 ->createInstance('log');
27 $executable = $this->prophesize(MigrateExecutableInterface::class)->reveal();
29 $log_message = "Testing the log message";
31 // Ensure the log is getting saved.
32 $saved_message = $plugin->transform($log_message, $executable, $row, 'buffalo');
33 $this->assertSame($log_message, $saved_message);