TrackerNodeTest.php 847 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<?php

namespace Drupal\Tests\tracker\Kernel\Plugin\migrate\source\d7;

use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;

/**
 * Tests D7 tracker node source plugin.
 *
 * @covers Drupal\tracker\Plugin\migrate\source\d7\TrackerNode
 *
 * @group tracker
 */
class TrackerNodeTest extends MigrateSqlSourceTestBase {

  /**
17 18
   * {@inheritdoc}
   */
19
  protected static $modules = ['tracker', 'migrate_drupal'];
20 21

  /**
22 23
   * {@inheritdoc}
   */
24 25 26 27 28 29 30 31 32
  public function providerSource() {
    $tests = [];

    // The source data.
    $tests[0]['database']['tracker_node'] = [
      [
        'nid' => '2',
        'published' => '1',
        'changed' => '1421727536',
33
      ],
34 35 36 37 38 39 40 41 42
    ];

    // The expected results are identical to the source data.
    $tests[0]['expected_results'] = $tests[0]['database']['tracker_node'];

    return $tests;
  }

}