'user__roles',
'users',
'users_field_data',
'watchdog',
];
} /**
* Tests the command directly.
*/
public function testDbDumpCommand() { $application =
new DbDumpApplication();
$command =
$application->
find('dump-database-d8-mysql'
);
$command_tester =
new CommandTester($command);
$command_tester->
execute([]);
// Tables that are schema-only should not have data exported.
$pattern =
preg_quote("\$connection->insert('sessions')"
);
$this->
assertDoesNotMatchRegularExpression('/' .
$pattern . '/',
$command_tester->
getDisplay(), 'Tables defined as schema-only do not have data exported to the script.'
);
// Table data is exported.
$pattern =
preg_quote("\$connection->insert('config')"
);
$this->
assertMatchesRegularExpression('/' .
$pattern . '/',
$command_tester->
getDisplay(), 'Table data is properly exported to the script.'
);