
| Current Path : /var/www/html1/bbp/web/core/modules/migrate/tests/src/Kernel/Plugin/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html1/bbp/web/core/modules/migrate/tests/src/Kernel/Plugin/LogTest.php |
<?php
namespace Drupal\Tests\migrate\Kernel\Plugin;
use Drupal\KernelTests\KernelTestBase;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\Row;
/**
* Tests the Log process plugin.
*
* @group migrate
*/
class LogTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['migrate'];
/**
* Test the Log plugin.
*/
public function testLog() {
$plugin = \Drupal::service('plugin.manager.migrate.process')
->createInstance('log');
$executable = $this->prophesize(MigrateExecutableInterface::class)->reveal();
$row = new Row();
$log_message = "Testing the log message";
// Ensure the log is getting saved.
$saved_message = $plugin->transform($log_message, $executable, $row, 'buffalo');
$this->assertSame($log_message, $saved_message);
}
}