public function MigrateTrackerNodeTest::testMigrateTrackerNode in Drupal 8
Same name and namespace in other branches
- 9 core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerNodeTest.php \Drupal\Tests\tracker\Kernel\Migrate\d7\MigrateTrackerNodeTest::testMigrateTrackerNode()
- 10 core/modules/tracker/tests/src/Kernel/Migrate/d7/MigrateTrackerNodeTest.php \Drupal\Tests\tracker\Kernel\Migrate\d7\MigrateTrackerNodeTest::testMigrateTrackerNode()
Tests migration of tracker node table.
File
- core/
modules/ tracker/ tests/ src/ Kernel/ Migrate/ d7/ MigrateTrackerNodeTest.php, line 47
Class
- MigrateTrackerNodeTest
- Tests migration of tracker_node.
Namespace
Drupal\Tests\tracker\Kernel\Migrate\d7Code
public function testMigrateTrackerNode() {
$connection = Database::getConnection('default', 'migrate');
$num_rows = $connection
->select('tracker_node', 'tn')
->fields('tn', [
'nid',
'published',
'changed',
])
->countQuery()
->execute()
->fetchField();
$this
->assertIdentical('1', $num_rows);
$tracker_nodes = $connection
->select('tracker_node', 'tn')
->fields('tn', [
'nid',
'published',
'changed',
])
->execute();
$row = $tracker_nodes
->fetchAssoc();
$this
->assertIdentical('1', $row['nid']);
$this
->assertIdentical('1', $row['published']);
$this
->assertIdentical('1421727536', $row['changed']);
}