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