3 namespace Drupal\Tests\action\Kernel\Plugin\migrate\source;
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
8 * Tests actions source plugin.
10 * @covers \Drupal\action\Plugin\migrate\source\Action
13 class ActionTest extends MigrateSqlSourceTestBase {
18 public static $modules = ['action', 'migrate_drupal'];
23 public function providerSource() {
26 $tests[0][0]['actions'] = [
28 'aid' => 'Redirect to node list page',
30 'callback' => 'system_goto_action',
31 'parameters' => 'a:1:{s:3:"url";s:4:"node";}',
32 'description' => 'Redirect to node list page',
35 'aid' => 'Test notice email',
37 'callback' => 'system_send_email_action',
38 'parameters' => 'a:3:{s:9:"recipient";s:7:"%author";s:7:"subject";s:4:"Test";s:7:"message";s:4:"Test',
39 'description' => 'Test notice email',
42 'aid' => 'comment_publish_action',
44 'callback' => 'comment_publish_action',
46 'description' => NULL,
49 'aid' => 'node_publish_action',
51 'callback' => 'node_publish_action',
53 'description' => NULL,
56 // The expected results are identical to the source data.
57 $tests[0][1] = $tests[0][0]['actions'];