Loading core/modules/config/tests/src/Functional/ConfigEntityTest.php +7 −7 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ public function testCRUD() { $this->assertIdentical($empty->language()->getId(), $default_langcode); // Verify ConfigEntity properties/methods on the newly created empty entity. $this->assertIdentical($empty->isNew(), TRUE); $this->assertTrue($empty->isNew()); $this->assertIdentical($empty->getOriginalId(), NULL); $this->assertIdentical($empty->bundle(), 'config_test'); $this->assertIdentical($empty->id(), NULL); Loading Loading @@ -85,7 +85,7 @@ public function testCRUD() { $empty_id = $storage->create([ 'id' => '', ]); $this->assertIdentical($empty_id->isNew(), TRUE); $this->assertTrue($empty_id->isNew()); try { $empty_id->save(); $this->fail('EntityMalformedException was thrown.'); Loading @@ -106,7 +106,7 @@ public function testCRUD() { $this->assertIdentical($config_test->language()->getId(), $default_langcode); // Verify methods on the newly created entity. $this->assertIdentical($config_test->isNew(), TRUE); $this->assertTrue($config_test->isNew()); $this->assertIdentical($config_test->getOriginalId(), $expected['id']); $this->assertIdentical($config_test->id(), $expected['id']); $this->assertTrue(Uuid::isValid($config_test->uuid())); Loading @@ -130,7 +130,7 @@ public function testCRUD() { $this->assertIdentical($config_test->id(), $expected['id']); $this->assertIdentical($config_test->uuid(), $expected['uuid']); $this->assertIdentical($config_test->label(), $expected['label']); $this->assertIdentical($config_test->isNew(), FALSE); $this->assertFalse($config_test->isNew()); $this->assertIdentical($config_test->getOriginalId(), $expected['id']); // Save again, and verify correct status and properties again. Loading @@ -139,7 +139,7 @@ public function testCRUD() { $this->assertIdentical($config_test->id(), $expected['id']); $this->assertIdentical($config_test->uuid(), $expected['uuid']); $this->assertIdentical($config_test->label(), $expected['label']); $this->assertIdentical($config_test->isNew(), FALSE); $this->assertFalse($config_test->isNew()); $this->assertIdentical($config_test->getOriginalId(), $expected['id']); // Verify that a configuration entity can be saved with an ID of the Loading Loading @@ -196,7 +196,7 @@ public function testCRUD() { $same_id = $storage->create([ 'id' => $config_test->id(), ]); $this->assertIdentical($same_id->isNew(), TRUE); $this->assertTrue($same_id->isNew()); try { $same_id->save(); $this->fail('Not possible to overwrite an entity entity.'); Loading @@ -219,7 +219,7 @@ public function testCRUD() { $this->assertIdentical($config_test->id(), $new_id); $status = $config_test->save(); $this->assertIdentical($status, SAVED_UPDATED); $this->assertIdentical($config_test->isNew(), FALSE); $this->assertFalse($config_test->isNew()); // Verify that originalID points to new ID directly after renaming. $this->assertIdentical($config_test->id(), $new_id); Loading core/modules/config/tests/src/Functional/ConfigImportUITest.php +2 −2 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ public function testImport() { // Create updated configuration object. $new_site_name = 'Config import test ' . $this->randomString(); $this->prepareSiteNameUpdate($new_site_name); $this->assertIdentical($sync->exists($name), TRUE, $name . ' found.'); $this->assertTrue($sync->exists($name), $name . ' found.'); // Create new config entity. $original_dynamic_data = [ Loading @@ -74,7 +74,7 @@ public function testImport() { 'protected_property' => '', ]; $sync->write($dynamic_name, $original_dynamic_data); $this->assertIdentical($sync->exists($dynamic_name), TRUE, $dynamic_name . ' found.'); $this->assertTrue($sync->exists($dynamic_name), $dynamic_name . ' found.'); // Enable the Automated Cron and Ban modules during import. The Ban // module is used because it creates a table during the install. Loading core/modules/config/tests/src/Functional/ConfigInstallWebTest.php +8 −8 Original line number Diff line number Diff line Loading @@ -53,9 +53,9 @@ public function testIntegrationModuleReinstallation() { // Verify the configuration does not exist prior to installation. $config_static = $this->config($default_config); $this->assertIdentical($config_static->isNew(), TRUE); $this->assertTrue($config_static->isNew()); $config_entity = $this->config($default_configuration_entity); $this->assertIdentical($config_entity->isNew(), TRUE); $this->assertTrue($config_entity->isNew()); // Install the integration module. \Drupal::service('module_installer')->install(['config_integration_test']); Loading @@ -65,10 +65,10 @@ public function testIntegrationModuleReinstallation() { \Drupal::configFactory()->reset($default_config); \Drupal::configFactory()->reset($default_configuration_entity); $config_static = $this->config($default_config); $this->assertIdentical($config_static->isNew(), FALSE); $this->assertFalse($config_static->isNew()); $this->assertIdentical($config_static->get('foo'), 'default setting'); $config_entity = $this->config($default_configuration_entity); $this->assertIdentical($config_entity->isNew(), FALSE); $this->assertFalse($config_entity->isNew()); $this->assertIdentical($config_entity->get('label'), 'Default integration config label'); // Customize both configuration objects. Loading @@ -86,11 +86,11 @@ public function testIntegrationModuleReinstallation() { // Verify the integration module's config was uninstalled. $config_static = $this->config($default_config); $this->assertIdentical($config_static->isNew(), TRUE); $this->assertTrue($config_static->isNew()); // Verify the integration config still exists. $config_entity = $this->config($default_configuration_entity); $this->assertIdentical($config_entity->isNew(), FALSE); $this->assertFalse($config_entity->isNew()); $this->assertIdentical($config_entity->get('label'), 'Customized integration config label'); // Reinstall the integration module. Loading @@ -112,12 +112,12 @@ public function testIntegrationModuleReinstallation() { \Drupal::configFactory()->reset($default_config); \Drupal::configFactory()->reset($default_configuration_entity); $config_static = $this->config($default_config); $this->assertIdentical($config_static->isNew(), FALSE); $this->assertFalse($config_static->isNew()); $this->assertIdentical($config_static->get('foo'), 'default setting'); // Verify the integration config is using the default. $config_entity = \Drupal::config($default_configuration_entity); $this->assertIdentical($config_entity->isNew(), FALSE); $this->assertFalse($config_entity->isNew()); $this->assertIdentical($config_entity->get('label'), 'Default integration config label'); } Loading core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ protected function setUp(): void { */ public function testContactSettings() { $config = $this->config('contact.settings'); $this->assertIdentical(TRUE, $config->get('user_default_enabled')); $this->assertTrue($config->get('user_default_enabled')); $this->assertIdentical(3, $config->get('flood.limit')); $this->assertIdentical('some_other_category', $config->get('default_form')); $this->assertConfigSchema(\Drupal::service('config.typed'), 'contact.settings', $config->get()); Loading core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public function testConfigImportUpdates() { $sync = $this->container->get('config.storage.sync'); // Verify the configuration to create does not exist yet. $this->assertIdentical($storage->exists($config_name), FALSE, $config_name . ' not found.'); $this->assertFalse($storage->exists($config_name), $config_name . ' not found.'); // Create new config entity. $data = [ Loading @@ -87,7 +87,7 @@ public function testConfigImportUpdates() { ], ]; $sync->write($config_name, $data); $this->assertIdentical($sync->exists($config_name), TRUE, $config_name . ' found.'); $this->assertTrue($sync->exists($config_name), $config_name . ' found.'); // Import. $this->configImporter->reset()->import(); Loading Loading
core/modules/config/tests/src/Functional/ConfigEntityTest.php +7 −7 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ public function testCRUD() { $this->assertIdentical($empty->language()->getId(), $default_langcode); // Verify ConfigEntity properties/methods on the newly created empty entity. $this->assertIdentical($empty->isNew(), TRUE); $this->assertTrue($empty->isNew()); $this->assertIdentical($empty->getOriginalId(), NULL); $this->assertIdentical($empty->bundle(), 'config_test'); $this->assertIdentical($empty->id(), NULL); Loading Loading @@ -85,7 +85,7 @@ public function testCRUD() { $empty_id = $storage->create([ 'id' => '', ]); $this->assertIdentical($empty_id->isNew(), TRUE); $this->assertTrue($empty_id->isNew()); try { $empty_id->save(); $this->fail('EntityMalformedException was thrown.'); Loading @@ -106,7 +106,7 @@ public function testCRUD() { $this->assertIdentical($config_test->language()->getId(), $default_langcode); // Verify methods on the newly created entity. $this->assertIdentical($config_test->isNew(), TRUE); $this->assertTrue($config_test->isNew()); $this->assertIdentical($config_test->getOriginalId(), $expected['id']); $this->assertIdentical($config_test->id(), $expected['id']); $this->assertTrue(Uuid::isValid($config_test->uuid())); Loading @@ -130,7 +130,7 @@ public function testCRUD() { $this->assertIdentical($config_test->id(), $expected['id']); $this->assertIdentical($config_test->uuid(), $expected['uuid']); $this->assertIdentical($config_test->label(), $expected['label']); $this->assertIdentical($config_test->isNew(), FALSE); $this->assertFalse($config_test->isNew()); $this->assertIdentical($config_test->getOriginalId(), $expected['id']); // Save again, and verify correct status and properties again. Loading @@ -139,7 +139,7 @@ public function testCRUD() { $this->assertIdentical($config_test->id(), $expected['id']); $this->assertIdentical($config_test->uuid(), $expected['uuid']); $this->assertIdentical($config_test->label(), $expected['label']); $this->assertIdentical($config_test->isNew(), FALSE); $this->assertFalse($config_test->isNew()); $this->assertIdentical($config_test->getOriginalId(), $expected['id']); // Verify that a configuration entity can be saved with an ID of the Loading Loading @@ -196,7 +196,7 @@ public function testCRUD() { $same_id = $storage->create([ 'id' => $config_test->id(), ]); $this->assertIdentical($same_id->isNew(), TRUE); $this->assertTrue($same_id->isNew()); try { $same_id->save(); $this->fail('Not possible to overwrite an entity entity.'); Loading @@ -219,7 +219,7 @@ public function testCRUD() { $this->assertIdentical($config_test->id(), $new_id); $status = $config_test->save(); $this->assertIdentical($status, SAVED_UPDATED); $this->assertIdentical($config_test->isNew(), FALSE); $this->assertFalse($config_test->isNew()); // Verify that originalID points to new ID directly after renaming. $this->assertIdentical($config_test->id(), $new_id); Loading
core/modules/config/tests/src/Functional/ConfigImportUITest.php +2 −2 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ public function testImport() { // Create updated configuration object. $new_site_name = 'Config import test ' . $this->randomString(); $this->prepareSiteNameUpdate($new_site_name); $this->assertIdentical($sync->exists($name), TRUE, $name . ' found.'); $this->assertTrue($sync->exists($name), $name . ' found.'); // Create new config entity. $original_dynamic_data = [ Loading @@ -74,7 +74,7 @@ public function testImport() { 'protected_property' => '', ]; $sync->write($dynamic_name, $original_dynamic_data); $this->assertIdentical($sync->exists($dynamic_name), TRUE, $dynamic_name . ' found.'); $this->assertTrue($sync->exists($dynamic_name), $dynamic_name . ' found.'); // Enable the Automated Cron and Ban modules during import. The Ban // module is used because it creates a table during the install. Loading
core/modules/config/tests/src/Functional/ConfigInstallWebTest.php +8 −8 Original line number Diff line number Diff line Loading @@ -53,9 +53,9 @@ public function testIntegrationModuleReinstallation() { // Verify the configuration does not exist prior to installation. $config_static = $this->config($default_config); $this->assertIdentical($config_static->isNew(), TRUE); $this->assertTrue($config_static->isNew()); $config_entity = $this->config($default_configuration_entity); $this->assertIdentical($config_entity->isNew(), TRUE); $this->assertTrue($config_entity->isNew()); // Install the integration module. \Drupal::service('module_installer')->install(['config_integration_test']); Loading @@ -65,10 +65,10 @@ public function testIntegrationModuleReinstallation() { \Drupal::configFactory()->reset($default_config); \Drupal::configFactory()->reset($default_configuration_entity); $config_static = $this->config($default_config); $this->assertIdentical($config_static->isNew(), FALSE); $this->assertFalse($config_static->isNew()); $this->assertIdentical($config_static->get('foo'), 'default setting'); $config_entity = $this->config($default_configuration_entity); $this->assertIdentical($config_entity->isNew(), FALSE); $this->assertFalse($config_entity->isNew()); $this->assertIdentical($config_entity->get('label'), 'Default integration config label'); // Customize both configuration objects. Loading @@ -86,11 +86,11 @@ public function testIntegrationModuleReinstallation() { // Verify the integration module's config was uninstalled. $config_static = $this->config($default_config); $this->assertIdentical($config_static->isNew(), TRUE); $this->assertTrue($config_static->isNew()); // Verify the integration config still exists. $config_entity = $this->config($default_configuration_entity); $this->assertIdentical($config_entity->isNew(), FALSE); $this->assertFalse($config_entity->isNew()); $this->assertIdentical($config_entity->get('label'), 'Customized integration config label'); // Reinstall the integration module. Loading @@ -112,12 +112,12 @@ public function testIntegrationModuleReinstallation() { \Drupal::configFactory()->reset($default_config); \Drupal::configFactory()->reset($default_configuration_entity); $config_static = $this->config($default_config); $this->assertIdentical($config_static->isNew(), FALSE); $this->assertFalse($config_static->isNew()); $this->assertIdentical($config_static->get('foo'), 'default setting'); // Verify the integration config is using the default. $config_entity = \Drupal::config($default_configuration_entity); $this->assertIdentical($config_entity->isNew(), FALSE); $this->assertFalse($config_entity->isNew()); $this->assertIdentical($config_entity->get('label'), 'Default integration config label'); } Loading
core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ protected function setUp(): void { */ public function testContactSettings() { $config = $this->config('contact.settings'); $this->assertIdentical(TRUE, $config->get('user_default_enabled')); $this->assertTrue($config->get('user_default_enabled')); $this->assertIdentical(3, $config->get('flood.limit')); $this->assertIdentical('some_other_category', $config->get('default_form')); $this->assertConfigSchema(\Drupal::service('config.typed'), 'contact.settings', $config->get()); Loading
core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public function testConfigImportUpdates() { $sync = $this->container->get('config.storage.sync'); // Verify the configuration to create does not exist yet. $this->assertIdentical($storage->exists($config_name), FALSE, $config_name . ' not found.'); $this->assertFalse($storage->exists($config_name), $config_name . ' not found.'); // Create new config entity. $data = [ Loading @@ -87,7 +87,7 @@ public function testConfigImportUpdates() { ], ]; $sync->write($config_name, $data); $this->assertIdentical($sync->exists($config_name), TRUE, $config_name . ' found.'); $this->assertTrue($sync->exists($config_name), $config_name . ' found.'); // Import. $this->configImporter->reset()->import(); Loading