ConfigEntityImportWithLocalNullUuidTest.php in Acquia Content Hub 8.2
File
tests/src/Kernel/ConfigEntityImportWithLocalNullUuidTest.php
View source
<?php
namespace Drupal\Tests\acquia_contenthub\Kernel;
class ConfigEntityImportWithLocalNullUuidTest extends ImportExportTestBase {
public static $modules = [
'user',
'node',
'field',
'acquia_contenthub_test',
'acquia_contenthub_subscriber',
'acquia_contenthub_test_config_import',
];
protected $fixtures = [
0 => [
'cdf' => 'node/node_type_basic_page.json',
'expectations' => 'expectations/node/node_type_basic_page.php',
],
];
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('user');
$this
->installSchema('user', [
'users_data',
]);
$this
->installEntitySchema('node');
$this
->installEntitySchema('node_type');
$this
->installSchema('node', [
'node_access',
]);
$this
->installSchema('acquia_contenthub_subscriber', 'acquia_contenthub_subscriber_import_tracking');
$this
->installConfig('acquia_contenthub_test_config_import');
}
public function testNodeConfigEntity(...$args) {
$config = \Drupal::configFactory()
->getEditable('node.type.page');
$config
->set('uuid', NULL);
$config
->save();
parent::configEntityImportExport(...$args);
}
public function nodeConfigEntityDataProvider() {
return [
[
0,
[
[
'type' => 'node_type',
'uuid' => '959b13f5-10b5-403b-b23d-f3e49aaa8776',
],
],
'node_type',
'959b13f5-10b5-403b-b23d-f3e49aaa8776',
],
];
}
}