Commit 84f40070 authored by catch's avatar catch
Browse files

Issue #3082415 by Krzysztof Domański, mondrake, alexpott, longwave, jungle:...

Issue #3082415 by Krzysztof Domański, mondrake, alexpott, longwave, jungle: Replace assert(Not)Same/Identical() on booleans with assert(Not)True/False() in PHPUnit tests

(cherry picked from commit 5132c83f)
parent de686a93
......@@ -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);
......@@ -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.');
......@@ -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()));
......@@ -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.
......@@ -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
......@@ -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.');
......@@ -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);
......
......@@ -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 = [
......@@ -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.
......
......@@ -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']);
......@@ -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.
......@@ -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.
......@@ -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');
}
......
......@@ -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());
......
......@@ -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 = [
......@@ -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();
......
......@@ -82,7 +82,7 @@ public function testFieldUpdates() {
$translation = $entity->getTranslation($this->translationLangcode);
$translation_metadata = $this->contentTranslationManager->getTranslationMetadata($translation);
$this->assertSame($this->sourceLangcode, $translation_metadata->getSource());
$this->assertSame(TRUE, $translation_metadata->isOutdated());
$this->assertTrue($translation_metadata->isOutdated());
}
}
......@@ -340,7 +340,7 @@ public function testMultipleTargetBundles() {
// should be reset (no auto-creation).
$vocabularies[1]->delete();
$field_config = FieldConfig::load($field_id);
$this->assertSame(FALSE, $field_config->getSetting('handler_settings')['auto_create']);
$this->assertFalse($field_config->getSetting('handler_settings')['auto_create']);
$this->assertFalse(isset($field_config->getSetting('handler_settings')['auto_create_bundle']));
}
......
......@@ -64,7 +64,7 @@ public function testEntityCountAndHasData() {
'bundle' => 'entity_test',
])->save();
$this->assertIdentical($field_storage->hasdata(), FALSE, 'There are no entities with field data.');
$this->assertFalse($field_storage->hasdata(), 'There are no entities with field data.');
$this->assertIdentical($this->storage->countFieldData($field_storage), 0, 'There are 0 entities with field data.');
// Create 1 entity without the field.
......@@ -72,7 +72,7 @@ public function testEntityCountAndHasData() {
$entity->name->value = $this->randomMachineName();
$entity->save();
$this->assertIdentical($field_storage->hasdata(), FALSE, 'There are no entities with field data.');
$this->assertFalse($field_storage->hasdata(), 'There are no entities with field data.');
$this->assertIdentical($this->storage->countFieldData($field_storage), 0, 'There are 0 entities with field data.');
// Create 12 entities to ensure that the purging works as expected.
......@@ -97,16 +97,16 @@ public function testEntityCountAndHasData() {
$this->assertEqual($result, 24, 'The field table has 24 rows.');
}
$this->assertIdentical($field_storage->hasdata(), TRUE, 'There are entities with field data.');
$this->assertTrue($field_storage->hasdata(), 'There are entities with field data.');
$this->assertEqual($this->storage->countFieldData($field_storage), 12, 'There are 12 entities with field data.');
// Ensure the methods work on deleted fields.
$field_storage->delete();
$this->assertIdentical($field_storage->hasdata(), TRUE, 'There are entities with deleted field data.');
$this->assertTrue($field_storage->hasdata(), 'There are entities with deleted field data.');
$this->assertEqual($this->storage->countFieldData($field_storage), 12, 'There are 12 entities with deleted field data.');
field_purge_batch(6);
$this->assertIdentical($field_storage->hasdata(), TRUE, 'There are entities with deleted field data.');
$this->assertTrue($field_storage->hasdata(), 'There are entities with deleted field data.');
$this->assertEqual($this->storage->countFieldData($field_storage), 6, 'There are 6 entities with deleted field data.');
$entity_type = 'entity_test_rev';
......@@ -117,7 +117,7 @@ public function testEntityCountAndHasData() {
->create(['type' => $entity_type]);
$cardinality = $this->fieldTestData->field_storage_2->getCardinality();
$this->assertIdentical($this->fieldTestData->field_storage_2->hasData(), FALSE, 'There are no entities with field data.');
$this->assertFalse($this->fieldTestData->field_storage_2->hasData(), 'There are no entities with field data.');
$this->assertIdentical($this->storageRev->countFieldData($this->fieldTestData->field_storage_2), 0, 'There are 0 entities with field data.');
// Create 1 entity with the field.
......@@ -128,14 +128,14 @@ public function testEntityCountAndHasData() {
$entity->save();
$first_revision = $entity->getRevisionId();
$this->assertIdentical($this->fieldTestData->field_storage_2->hasData(), TRUE, 'There are entities with field data.');
$this->assertTrue($this->fieldTestData->field_storage_2->hasData(), 'There are entities with field data.');
$this->assertIdentical($this->storageRev->countFieldData($this->fieldTestData->field_storage_2), 1, 'There is 1 entity with field data.');
$entity->{$this->fieldTestData->field_name_2} = [];
$entity->setNewRevision();
$entity->save();
$this->assertIdentical($this->fieldTestData->field_storage_2->hasData(), TRUE, 'There are entities with field data.');
$this->assertTrue($this->fieldTestData->field_storage_2->hasData(), 'There are entities with field data.');
$storage = $this->container->get('entity_type.manager')->getStorage($entity_type);
$entity = $storage->loadRevision($first_revision);
......@@ -173,11 +173,11 @@ public function testCountWithIndex0() {
// Test shared table storage.
$storage = $user->getFieldDefinition('name')->getFieldStorageDefinition();
$this->assertIdentical(TRUE, $this->storageUser->countFieldData($storage, TRUE));
$this->assertTrue($this->storageUser->countFieldData($storage, TRUE));
// Test dedicated table storage.
$storage = $user->getFieldDefinition('field_int')->getFieldStorageDefinition();
$this->assertIdentical(TRUE, $this->storageUser->countFieldData($storage, TRUE));
$this->assertTrue($this->storageUser->countFieldData($storage, TRUE));
}
}
......@@ -34,7 +34,7 @@ public function testUploadFieldInstance() {
$this->assertIdentical('node.page.upload', $field->id());
$this->assertIdentical('jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp', $settings['file_extensions']);
$this->assertIdentical('1MB', $settings['max_filesize']);
$this->assertIdentical(TRUE, $settings['description_field']);
$this->assertTrue($settings['description_field']);
$field = FieldConfig::load('node.story.upload');
$this->assertIdentical('node.story.upload', $field->id());
......
......@@ -77,16 +77,16 @@ public function testUpload() {
$this->assertIdentical(1, count($node->upload));
$this->assertIdentical('1', $node->upload[0]->target_id);
$this->assertIdentical('file 1-1-1', $node->upload[0]->description);
$this->assertIdentical(FALSE, $node->upload[0]->isDisplayed());
$this->assertFalse($node->upload[0]->isDisplayed());
$node = $nodes[2];
$this->assertEquals('en', $node->langcode->value);
$this->assertIdentical(2, count($node->upload));
$this->assertIdentical('3', $node->upload[0]->target_id);
$this->assertIdentical('file 2-3-3', $node->upload[0]->description);
$this->assertIdentical(FALSE, $node->upload[0]->isDisplayed());
$this->assertFalse($node->upload[0]->isDisplayed());
$this->assertIdentical('2', $node->upload[1]->target_id);
$this->assertIdentical(TRUE, $node->upload[1]->isDisplayed());
$this->assertTrue($node->upload[1]->isDisplayed());
$this->assertIdentical('file 2-3-2', $node->upload[1]->description);
$node = $nodes[12];
......
......@@ -133,7 +133,7 @@ public function doTestRemoveUsage() {
->condition('f.fid', $file->id())
->execute()
->fetchField();
$this->assertIdentical(FALSE, $count, 'The count was removed entirely when empty.');
$this->assertFalse($count, 'The count was removed entirely when empty.');
// Non-existent decrement.
$file_usage->delete($file, 'testing', 'bar', 2);
......@@ -142,7 +142,7 @@ public function doTestRemoveUsage() {
->condition('f.fid', $file->id())
->execute()
->fetchField();
$this->assertIdentical(FALSE, $count, 'Decrementing non-exist record complete.');
$this->assertFalse($count, 'Decrementing non-exist record complete.');
return $file;
}
......
......@@ -41,8 +41,8 @@ public function testFilterFormat() {
// Check variables migrated into filter.
$this->assertSame('<a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>', $filters['filter_html']['settings']['allowed_html']);
$this->assertSame(TRUE, $filters['filter_html']['settings']['filter_html_help']);
$this->assertSame(FALSE, $filters['filter_html']['settings']['filter_html_nofollow']);
$this->assertTrue($filters['filter_html']['settings']['filter_html_help']);
$this->assertFalse($filters['filter_html']['settings']['filter_html_nofollow']);
$this->assertSame(72, $filters['filter_url']['settings']['filter_url_length']);
// Assert that the php_code format was migrated with filter_null in the
......
......@@ -254,7 +254,7 @@ public function testHelpTopicsDefinition() {
$definition = $discovery->getDefinitions()['foo.topic'];
$this->assertEquals('Test', $definition['label']);
$this->assertInstanceOf(TranslatableMarkup::class, $definition['label']);
$this->assertSame(TRUE, $definition['top_level']);
$this->assertTrue($definition['top_level']);
// Each related plugin ID should be trimmed.
$this->assertSame(['one', 'two', 'three'], $definition['related']);
$this->assertSame('foo', $definition['provider']);
......
......@@ -142,7 +142,7 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s
// Create the directories for the styles.
$directory = $scheme . '://styles/' . $this->style->id();
$status = \Drupal::service('file_system')->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY);
$this->assertNotIdentical(FALSE, $status, 'Created the directory for the generated images for the test style.');
$this->assertNotFalse($status, 'Created the directory for the generated images for the test style.');
// Override the language to build the URL for the correct language.
if ($langcode) {
......@@ -160,7 +160,7 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s
// Let the image_module_test module know about this file, so it can claim
// ownership in hook_file_download().
\Drupal::state()->set('image.test_file_download', $original_uri);
$this->assertNotIdentical(FALSE, $original_uri, 'Created the generated image file.');
$this->assertNotFalse($original_uri, 'Created the generated image file.');
// Get the URL of a file that has not been generated and try to create it.
$generated_uri = $this->style->buildUri($original_uri);
......
......@@ -701,7 +701,7 @@ protected function assertResourceResponse($expected_status_code, $expected_docum
// sets it to 'text/html' by default. We also cannot detect the presence
// of Apache either here in the CLI. For now having this documented here
// is all we can do.
/* $this->assertSame(FALSE, $response->hasHeader('Content-Type')); */
/* $this->assertFalse($response->hasHeader('Content-Type')); */
$this->assertSame('', (string) $response->getBody());
}
else {
......
......@@ -109,7 +109,7 @@ protected function doTestLanguageBlockAuthenticated($block_label) {
$this->assertIdentical($anchors, $expected_anchors, 'The anchors have the correct attributes that will allow the drupal.active-link library to mark them as active.');
$settings = $this->getDrupalSettings();
$this->assertIdentical($settings['path']['currentPath'], 'user/2', 'drupalSettings.path.currentPath is set correctly to allow drupal.active-link to mark the correct links as active.');
$this->assertIdentical($settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
$this->assertFalse($settings['path']['isFront'], 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
$this->assertIdentical($settings['path']['currentLanguage'], 'en', 'drupalSettings.path.currentLanguage is set correctly to allow drupal.active-link to mark the correct links as active.');
$this->assertIdentical($labels, ['English', 'français'], 'The language links labels are in their own language on the language switcher block.');
}
......@@ -320,7 +320,7 @@ protected function doTestLanguageLinkActiveClassAuthenticated() {
// Verify that drupalSettings contains the correct values.
$settings = $this->getDrupalSettings();
$this->assertIdentical($settings['path']['currentPath'], $path, 'drupalSettings.path.currentPath is set correctly to allow drupal.active-link to mark the correct links as active.');
$this->assertIdentical($settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
$this->assertFalse($settings['path']['isFront'], 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
$this->assertIdentical($settings['path']['currentLanguage'], 'en', 'drupalSettings.path.currentLanguage is set correctly to allow drupal.active-link to mark the correct links as active.');
// Test links generated by the link generator on a French page.
......@@ -345,7 +345,7 @@ protected function doTestLanguageLinkActiveClassAuthenticated() {
// Verify that drupalSettings contains the correct values.
$settings = $this->getDrupalSettings();
$this->assertIdentical($settings['path']['currentPath'], $path, 'drupalSettings.path.currentPath is set correctly to allow drupal.active-link to mark the correct links as active.');
$this->assertIdentical($settings['path']['isFront'], FALSE, 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
$this->assertFalse($settings['path']['isFront'], 'drupalSettings.path.isFront is set correctly to allow drupal.active-link to mark the correct links as active.');
$this->assertIdentical($settings['path']['currentLanguage'], 'fr', 'drupalSettings.path.currentLanguage is set correctly to allow drupal.active-link to mark the correct links as active.');
}
......
......@@ -101,7 +101,7 @@ public function testBlockAccessEntityAllowedNotFieldable() {
$entity->access('view', $account->reveal(), TRUE)->willReturn(AccessResult::allowed());
$access = $block->access($account->reveal(), TRUE);
$this->assertSame(FALSE, $access->isAllowed());
$this->assertFalse($access->isAllowed());
}
/**
......@@ -119,7 +119,7 @@ public function testBlockAccessEntityAllowedNoField() {
$entity->get('the_field_name')->shouldNotBeCalled();
$access = $block->access($account->reveal(), TRUE);
$this->assertSame(FALSE, $access->isAllowed());
$this->assertFalse($access->isAllowed());
}
/**
......
......@@ -109,9 +109,9 @@ public function testAccess($expected, $is_enabled, array $section_data, array $p
// Perform the same checks again but with a non default translation which
// should always deny access.
$result = $this->plugin->access('view');
$this->assertSame(FALSE, $result);
$this->assertFalse($result);
$result = $this->plugin->access('view', $account);
$this->assertSame(FALSE, $result);
$this->assertFalse($result);
}
/**
......
......@@ -32,7 +32,7 @@ protected function setUp(): void {
*/
public function testLocaleSettings() {
$config = $this->config('locale.settings');
$this->assertIdentical(TRUE, $config->get('cache_strings'));
$this->assertTrue($config->get('cache_strings'));
$this->assertIdentical('languages', $config->get('javascript.directory'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'locale.settings', $config->get());
}
......
......@@ -45,10 +45,7 @@ public function testEmbeddedData() {
$results = [];
/** @var \Drupal\migrate\Row $row */
foreach ($source as $row) {
// The plugin should not mark any rows as stubs. We need to use
// assertSame() here because assertFalse() will pass falsy values (e.g.,
// empty arrays).
$this->assertSame(FALSE, $row->isStub());
$this->assertFalse($row->isStub());
$data_row = $row->getSource();
// The "data" row returned by getSource() also includes all source
......
......@@ -123,7 +123,7 @@ public function testVariableGet() {
$this->assertEquals('my_default', $this->base->variableGetWrapper('non_existent_variable', 'my_default'));
// Test non-default.
$this->assertSame(TRUE, $this->base->variableGetWrapper('my_variable', FALSE));
$this->assertTrue($this->base->variableGetWrapper('my_variable', FALSE));
}
}
......
......@@ -27,7 +27,7 @@ protected function setUp(): void {
*/
public function testNodeSettings() {
$config = $this->config('node.settings');
$this->assertIdentical(FALSE, $config->get('use_admin_theme'));
$this->assertFalse($config->get('use_admin_theme'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'node.settings', $config->get());
}
......
......@@ -58,7 +58,7 @@ public function testNode() {
$this->assertIdentical('story', $node->getType(), 'Node has the correct bundle.');
$this->assertIdentical('Test title', $node->getTitle(), 'Node has the correct title.');
$this->assertIdentical('1390095702', $node->getCreatedTime(), 'Node has the correct created time.');
$this->assertIdentical(FALSE, $node->isSticky());
$this->assertFalse($node->isSticky());
$this->assertIdentical('1', $node->getOwnerId());
$this->assertIdentical('1390095702', $node->getRevisionCreationTime());
......
......@@ -35,8 +35,8 @@ public function testNodeType() {
// Test the test_page content type.
$node_type_page = NodeType::load('test_page');
$this->assertIdentical('test_page', $node_type_page->id(), 'Node type test_page loaded');
$this->assertIdentical(TRUE, $node_type_page->displaySubmitted());
$this->assertIdentical(FALSE, $node_type_page->shouldCreateNewRevision());
$this->assertTrue($node_type_page->displaySubmitted());
$this->assertFalse($node_type_page->shouldCreateNewRevision());
$this->assertIdentical(DRUPAL_OPTIONAL, $node_type_page->getPreviewMode());
$this->assertIdentical($id_map->lookupDestinationIds(['test_page']), [['test_page']]);
......@@ -54,8 +54,8 @@ public function testNodeType() {
$node_type_story = NodeType::load('test_story');
$this->assertIdentical('test_story', $node_type_story->id(), 'Node type test_story loaded');
$this->assertIdentical(TRUE, $node_type_story->displaySubmitted());
$this->assertIdentical(FALSE, $node_type_story->shouldCreateNewRevision());
$this->assertTrue($node_type_story->displaySubmitted());
$this->assertFalse($node_type_story->shouldCreateNewRevision());
$this->assertIdentical(DRUPAL_OPTIONAL, $node_type_story->getPreviewMode());
$this->assertIdentical($id_map->lookupDestinationIds(['test_story']), [['test_story']]);
......@@ -73,8 +73,8 @@ public function testNodeType() {
$node_type_event = NodeType::load('test_event');
$this->assertIdentical('test_event', $node_type_event->id(), 'Node type test_event loaded');
$this->assertIdentical(TRUE, $node_type_event->displaySubmitted());
$this->assertIdentical(TRUE, $node_type_event->shouldCreateNewRevision());
$this->assertTrue($node_type_event->displaySubmitted());
$this->assertTrue($node_type_event->shouldCreateNewRevision());
$this->assertIdentical(DRUPAL_OPTIONAL, $node_type_event->getPreviewMode());
$this->assertIdentical($id_map->lookupDestinationIds(['test_event']), [['test_event']]);
......
......@@ -273,7 +273,7 @@ function () {
JS;
$result = $this->getSession()->evaluateScript($js_match_field_element_attributes);
foreach ($expected_field_attributes as $quickedit_field_id => $expectation) {
$this->assertSame(TRUE, $result[$quickedit_field_id], 'Field ' . $quickedit_field_id . ' did not match its expectation selector (' . $expectation . '), actual HTML: ' . $result[$quickedit_field_id]);
$this->assertTrue($result[$quickedit_field_id], 'Field ' . $quickedit_field_id . ' did not match its expectation selector (' . $expectation . '), actual HTML: ' . $result[$quickedit_field_id]);
}
}
......
......@@ -383,7 +383,7 @@ protected function assertResourceResponse($expected_status_code, $expected_body,
// sets it to 'text/html' by default. We also cannot detect the presence
// of Apache either here in the CLI. For now having this documented here
// is all we can do.
// $this->assertSame(FALSE, $response->hasHeader('Content-Type'));
// $this->assertFalse($response->hasHeader('Content-Type'));
$this->assertSame('', (string) $response->getBody());
}
else {
......
......@@ -33,9 +33,9 @@ protected function setUp(): void {
public function testSearchSettings() {
$config = $this->config('search.settings');
$this->assertIdentical(3, $config->get('index.minimum_word_size'));
$this->assertIdentical(TRUE, $config->get('index.overlap_cjk'));
$this->assertTrue($config->get('index.overlap_cjk'));
$this->assertIdentical(100, $config->get('index.cron_limit'));
$this->assertIdentical(TRUE, $config->get('logging'));
$this->assertTrue($config->get('logging'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'search.settings', $config->get());
}
......