only in patch2: unchanged: --- a/core/modules/action/tests/src/Functional/BulkFormTest.php +++ b/core/modules/action/tests/src/Functional/BulkFormTest.php @@ -106,7 +106,7 @@ public function testBulkForm() { $this->drupalGet('test_bulk_form'); $options = $this->xpath('//select[@id=:id]/option', [':id' => 'edit-action']); - $this->assertEqual(count($options), 2); + $this->assertEquals(count($options), 2); $this->assertOption('edit-action', 'node_make_sticky_action'); $this->assertOption('edit-action', 'node_make_unsticky_action'); @@ -123,7 +123,7 @@ public function testBulkForm() { // Check the default title. $this->drupalGet('test_bulk_form'); $result = $this->xpath('//label[@for="edit-action"]'); - $this->assertEqual('Action', $result[0]->getText()); + $this->assertEquals('Action', $result[0]->getText()); // Setup up a different bulk form title. $view = Views::getView('test_bulk_form'); @@ -133,7 +133,7 @@ public function testBulkForm() { $this->drupalGet('test_bulk_form'); $result = $this->xpath('//label[@for="edit-action"]'); - $this->assertEqual('Test title', $result[0]->getText()); + $this->assertEquals('Test title', $result[0]->getText()); $this->drupalGet('test_bulk_form'); // Call the node delete action. only in patch2: unchanged: --- a/core/modules/aggregator/src/Tests/AggregatorTestBase.php +++ b/core/modules/aggregator/src/Tests/AggregatorTestBase.php @@ -187,7 +187,7 @@ public function updateFeedItems(FeedInterface $feed, $expected_count = NULL) { if ($expected_count !== NULL) { $feed->item_count = count($feed->items); - $this->assertEqual($expected_count, $feed->item_count, format_string('Total items in feed equal to the total items in database (@val1 != @val2)', ['@val1' => $expected_count, '@val2' => $feed->item_count])); + $this->assertEquals($expected_count, $feed->item_count, format_string('Total items in feed equal to the total items in database (@val1 != @val2)', ['@val1' => $expected_count, '@val2' => $feed->item_count])); } } only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php +++ b/core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php @@ -65,7 +65,7 @@ public function testOverviewPage() { $result = $this->xpath('//table/tbody/tr'); // Check if the amount of feeds in the overview matches the amount created. - $this->assertEqual(1, count($result), 'Created feed is found in the overview'); + $this->assertEquals(1, count($result), 'Created feed is found in the overview'); // Check if the fields in the table match with what's expected. $link = $this->xpath('//table/tbody/tr//td[1]/a'); $this->assertEquals($feed->label(), $link[0]->getText()); only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php +++ b/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php @@ -21,11 +21,11 @@ public function testCron() { $this->createSampleNodes(); $feed = $this->createFeed(); $this->cronRun(); - $this->assertEqual(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); + $this->assertEquals(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); $this->deleteFeedItems($feed); - $this->assertEqual(0, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); + $this->assertEquals(0, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); $this->cronRun(); - $this->assertEqual(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); + $this->assertEquals(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); // Test feed locking when queued for update. $this->deleteFeedItems($feed); @@ -36,7 +36,7 @@ public function testCron() { ]) ->execute(); $this->cronRun(); - $this->assertEqual(0, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); + $this->assertEquals(0, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); db_update('aggregator_feed') ->condition('fid', $feed->id()) ->fields([ @@ -44,7 +44,7 @@ public function testCron() { ]) ->execute(); $this->cronRun(); - $this->assertEqual(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); + $this->assertEquals(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); } } only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php +++ b/core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php @@ -128,7 +128,7 @@ public function testFeedPage() { $this->drupalLogin($this->adminUser); $this->drupalGet('aggregator/rss'); $this->assertResponse(200); - $this->assertEqual($this->drupalGetHeader('Content-type'), 'application/rss+xml; charset=utf-8'); + $this->assertEquals($this->drupalGetHeader('Content-type'), 'application/rss+xml; charset=utf-8'); // Check the opml aggregator page. $this->drupalGet('aggregator/opml'); only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php +++ b/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php @@ -184,7 +184,7 @@ public function updateFeedItems(FeedInterface $feed, $expected_count = NULL) { if ($expected_count !== NULL) { $feed->item_count = count($feed->items); - $this->assertEqual($expected_count, $feed->item_count, format_string('Total items in feed equal to the total items in database (@val1 != @val2)', ['@val1' => $expected_count, '@val2' => $feed->item_count])); + $this->assertEquals($expected_count, $feed->item_count, format_string('Total items in feed equal to the total items in database (@val1 != @val2)', ['@val1' => $expected_count, '@val2' => $feed->item_count])); } } only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Functional/DeleteFeedTest.php +++ b/core/modules/aggregator/tests/src/Functional/DeleteFeedTest.php @@ -36,7 +36,7 @@ public function testDeleteFeed() { $this->assertText($feed2->label()); $block_storage = $this->container->get('entity.manager')->getStorage('block'); $this->assertNull($block_storage->load($block->id()), 'Block for the deleted feed was deleted.'); - $this->assertEqual($block2->id(), $block_storage->load($block2->id())->id(), 'Block for not deleted feed still exists.'); + $this->assertEquals($block2->id(), $block_storage->load($block2->id())->id(), 'Block for not deleted feed still exists.'); // Check feed source. $this->drupalGet('aggregator/sources/' . $feed1->id()); only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php +++ b/core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php @@ -66,8 +66,8 @@ public function testFeedLanguage() { $feeds[2] = $this->createFeed(NULL, ['langcode[0][value]' => $this->langcodes[2]]); // Make sure that the language has been assigned. - $this->assertEqual($feeds[1]->language()->getId(), $this->langcodes[1]); - $this->assertEqual($feeds[2]->language()->getId(), $this->langcodes[2]); + $this->assertEquals($feeds[1]->language()->getId(), $this->langcodes[1]); + $this->assertEquals($feeds[2]->language()->getId(), $this->langcodes[2]); // Create example nodes to create feed items from and then update the feeds. $this->createSampleNodes(); @@ -80,7 +80,7 @@ public function testFeedLanguage() { $items = entity_load_multiple_by_properties('aggregator_item', ['fid' => $feed->id()]); $this->assertTrue(count($items) > 0, 'Feed items were created.'); foreach ($items as $item) { - $this->assertEqual($item->language()->getId(), $feed->language()->getId()); + $this->assertEquals($item->language()->getId(), $feed->language()->getId()); } } } only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Functional/FeedParserTest.php +++ b/core/modules/aggregator/tests/src/Functional/FeedParserTest.php @@ -57,7 +57,7 @@ public function testAtomSample() { $this->assertText('Atom-Powered Robots Run Amok'); $this->assertLinkByHref('http://example.org/2003/12/13/atom03'); $this->assertText('Some text.'); - $this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', db_query('SELECT guid FROM {aggregator_item} WHERE link = :link', [':link' => 'http://example.org/2003/12/13/atom03'])->fetchField(), 'Atom entry id element is parsed correctly.'); + $this->assertEquals('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', db_query('SELECT guid FROM {aggregator_item} WHERE link = :link', [':link' => 'http://example.org/2003/12/13/atom03'])->fetchField(), 'Atom entry id element is parsed correctly.'); // Check for second feed entry. $this->assertText('We tried to stop them, but we failed.'); @@ -66,7 +66,7 @@ public function testAtomSample() { $db_guid = db_query('SELECT guid FROM {aggregator_item} WHERE link = :link', [ ':link' => 'http://example.org/2003/12/14/atom03', ])->fetchField(); - $this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-bbbb-80da344efa6a', $db_guid, 'Atom entry id element is parsed correctly.'); + $this->assertEquals('urn:uuid:1225c695-cfb8-4ebb-bbbb-80da344efa6a', $db_guid, 'Atom entry id element is parsed correctly.'); } /** @@ -90,7 +90,7 @@ public function testRedirectFeed() { $feed->refreshItems(); // Make sure that the feed URL was updated correctly. - $this->assertEqual($feed->getUrl(), \Drupal::url('aggregator_test.feed', [], ['absolute' => TRUE])); + $this->assertEquals($feed->getUrl(), \Drupal::url('aggregator_test.feed', [], ['absolute' => TRUE])); } /** only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Functional/FeedProcessorPluginTest.php +++ b/core/modules/aggregator/tests/src/Functional/FeedProcessorPluginTest.php @@ -61,7 +61,7 @@ public function testPostProcess() { // Reload the feed to get new values. $feed = Feed::load($feed_id); // Make sure its refresh rate doubled. - $this->assertEqual($feed->getRefreshRate(), 3600); + $this->assertEquals($feed->getRefreshRate(), 3600); } } only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php +++ b/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php @@ -63,7 +63,7 @@ public function validateImportFormFields() { $this->assertText(t('The URL invalidUrl://empty is not valid.'), 'Error if the URL is invalid.'); $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); - $this->assertEqual($before, $after, 'No feeds were added during the three last form submissions.'); + $this->assertEquals($before, $after, 'No feeds were added during the three last form submissions.'); } /** @@ -81,7 +81,7 @@ protected function submitImportForm() { $this->assertText(t('No new feed has been added.'), 'Attempting to load empty OPML from remote URL.'); $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); - $this->assertEqual($before, $after, 'No feeds were added during the two last form submissions.'); + $this->assertEquals($before, $after, 'No feeds were added during the two last form submissions.'); db_delete('aggregator_feed')->execute(); @@ -97,7 +97,7 @@ protected function submitImportForm() { $this->assertRaw(t('A feed named %title already exists.', ['%title' => $feeds[1]['title[0][value]']]), 'Verifying that a duplicate title was identified'); $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); - $this->assertEqual($after, 2, 'Verifying that two distinct feeds were added.'); + $this->assertEquals($after, 2, 'Verifying that two distinct feeds were added.'); $feeds_from_db = db_query("SELECT title, url, refresh FROM {aggregator_feed}"); $refresh = TRUE; @@ -107,8 +107,8 @@ protected function submitImportForm() { $refresh = $refresh && $feed->refresh == 900; } - $this->assertEqual($title[$feeds[0]['url[0][value]']], $feeds[0]['title[0][value]'], 'First feed was added correctly.'); - $this->assertEqual($url[$feeds[1]['title[0][value]']], $feeds[1]['url[0][value]'], 'Second feed was added correctly.'); + $this->assertEquals($title[$feeds[0]['url[0][value]']], $feeds[0]['title[0][value]'], 'First feed was added correctly.'); + $this->assertEquals($url[$feeds[1]['title[0][value]']], $feeds[1]['url[0][value]'], 'Second feed was added correctly.'); $this->assertTrue($refresh, 'Refresh times are correct.'); } only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Kernel/FeedValidationTest.php +++ b/core/modules/aggregator/tests/src/Kernel/FeedValidationTest.php @@ -39,7 +39,7 @@ public function testValidation() { ]); $violations = $feed->validate(); - $this->assertEqual(count($violations), 0); + $this->assertEquals(count($violations), 0); $feed->save(); @@ -53,13 +53,13 @@ public function testValidation() { $violations = $feed->validate(); - $this->assertEqual(count($violations), 2); - $this->assertEqual($violations[0]->getPropertyPath(), 'title'); - $this->assertEqual($violations[0]->getMessage(), t('A feed named %value already exists. Enter a unique title.', [ + $this->assertEquals(count($violations), 2); + $this->assertEquals($violations[0]->getPropertyPath(), 'title'); + $this->assertEquals($violations[0]->getMessage(), t('A feed named %value already exists. Enter a unique title.', [ '%value' => $feed->label(), ])); - $this->assertEqual($violations[1]->getPropertyPath(), 'url'); - $this->assertEqual($violations[1]->getMessage(), t('A feed with this URL %value already exists. Enter a unique URL.', [ + $this->assertEquals($violations[1]->getPropertyPath(), 'url'); + $this->assertEquals($violations[1]->getMessage(), t('A feed with this URL %value already exists. Enter a unique URL.', [ '%value' => $feed->getUrl(), ])); } only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php +++ b/core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php @@ -45,8 +45,8 @@ public function testAggregatorItem() { $this->assertIdentical($original->fid, $item->getFeedId()); $this->assertIdentical($original->title, $item->label()); // If $original->author is an empty string, getAuthor() returns NULL so - // we need to use assertEqual() here. - $this->assertEqual($original->author, $item->getAuthor()); + // we need to use assertEquals() here. + $this->assertEquals($original->author, $item->getAuthor()); $this->assertIdentical($original->description, $item->getDescription()); $this->assertIdentical($original->link, $item->getLink()); $this->assertIdentical($original->timestamp, $item->getPostedTime()); only in patch2: unchanged: --- a/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php +++ b/core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php @@ -115,19 +115,19 @@ public function testAggregatorItemView() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($view, $row) { return $view->field['title']->advancedRender($row); }); - $this->assertEqual($output, $expected_link->getGeneratedLink(), 'Ensure the right link is generated'); + $this->assertEquals($output, $expected_link->getGeneratedLink(), 'Ensure the right link is generated'); $expected_author = Xss::filter($items[$iid]->getAuthor(), _aggregator_allowed_tags()); $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($view, $row) { return $view->field['author']->advancedRender($row); }); - $this->assertEqual($output, $expected_author, 'Ensure the author got filtered'); + $this->assertEquals($output, $expected_author, 'Ensure the author got filtered'); $expected_description = Xss::filter($items[$iid]->getDescription(), _aggregator_allowed_tags()); $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($view, $row) { return $view->field['description']->advancedRender($row); }); - $this->assertEqual($output, $expected_description, 'Ensure the author got filtered'); + $this->assertEquals($output, $expected_description, 'Ensure the author got filtered'); } } only in patch2: unchanged: --- a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php +++ b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php @@ -88,7 +88,7 @@ public function testIPAddressValidation() { $query->fields('bip', ['iid']); $query->condition('bip.ip', $ip); $ip_count = $query->execute()->fetchAll(); - $this->assertEqual(1, count($ip_count)); + $this->assertEquals(1, count($ip_count)); $ip = ''; $banIp->banIp($ip); $banIp->banIp($ip); @@ -96,7 +96,7 @@ public function testIPAddressValidation() { $query->fields('bip', ['iid']); $query->condition('bip.ip', $ip); $ip_count = $query->execute()->fetchAll(); - $this->assertEqual(1, count($ip_count)); + $this->assertEquals(1, count($ip_count)); } } only in patch2: unchanged: --- a/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php +++ b/core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php @@ -49,7 +49,7 @@ public function testBasicAuth() { $this->mink->resetSessions(); $this->drupalGet($url); - $this->assertEqual($this->drupalGetHeader('WWW-Authenticate'), SafeMarkup::format('Basic realm="@realm"', ['@realm' => \Drupal::config('system.site')->get('name')])); + $this->assertEquals($this->drupalGetHeader('WWW-Authenticate'), SafeMarkup::format('Basic realm="@realm"', ['@realm' => \Drupal::config('system.site')->get('name')])); $this->assertResponse('401', 'Not authenticated on the route that allows only basic_auth. Prompt to authenticate received.'); $this->drupalGet('admin'); @@ -66,7 +66,7 @@ public function testBasicAuth() { // cache if basic auth credentials are provided. $url = Url::fromRoute('router_test.10'); $this->drupalGet($url); - $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS'); + $this->assertEquals($this->drupalGetHeader('X-Drupal-Cache'), 'MISS'); $this->basicAuthGet($url, $account->getUsername(), $account->pass_raw); $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache')); $this->assertIdentical(strpos($this->drupalGetHeader('Cache-Control'), 'public'), FALSE, 'No page cache response when requesting a cached page with basic auth credentials.'); only in patch2: unchanged: --- a/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php +++ b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php @@ -184,11 +184,11 @@ public function testBigPipe() { $this->assertTrue(in_array('big_pipe/big_pipe', explode(',', $this->getDrupalSettings()['ajaxPageState']['libraries'])), 'BigPipe asset library is present.'); // Verify that the two expected exceptions are logged as errors. - $this->assertEqual($log_count + 2, db_query('SELECT COUNT(*) FROM {watchdog}')->fetchField(), 'Two new watchdog entries.'); + $this->assertEquals($log_count + 2, db_query('SELECT COUNT(*) FROM {watchdog}')->fetchField(), 'Two new watchdog entries.'); $records = db_query('SELECT * FROM {watchdog} ORDER BY wid DESC LIMIT 2')->fetchAll(); - $this->assertEqual(RfcLogLevel::ERROR, $records[0]->severity); + $this->assertEquals(RfcLogLevel::ERROR, $records[0]->severity); $this->assertTrue(FALSE !== strpos((string) unserialize($records[0]->variables)['@message'], 'Oh noes!')); - $this->assertEqual(RfcLogLevel::ERROR, $records[1]->severity); + $this->assertEquals(RfcLogLevel::ERROR, $records[1]->severity); $this->assertTrue(FALSE !== strpos((string) unserialize($records[1]->variables)['@message'], 'You are not allowed to say llamas are not cool!')); // Verify that 4xx responses work fine. (4xx responses are handled by @@ -251,7 +251,7 @@ public function testBigPipeNoJs() { ]); $this->pass('Verifying there are no BigPipe placeholders & replacements…', 'Debug'); - $this->assertEqual('', $this->drupalGetHeader('BigPipe-Test-Placeholders')); + $this->assertEquals('', $this->drupalGetHeader('BigPipe-Test-Placeholders')); $this->pass('Verifying BigPipe start/stop signals are absent…', 'Debug'); $this->assertNoRaw(BigPipe::START_SIGNAL, 'BigPipe start signal absent.'); $this->assertNoRaw(BigPipe::STOP_SIGNAL, 'BigPipe stop signal absent.'); @@ -315,8 +315,8 @@ public function testBigPipeMultiOccurrencePlaceholders() { protected function assertBigPipeResponseHeadersPresent() { $this->pass('Verifying BigPipe response headers…', 'Debug'); $this->assertTrue(FALSE !== strpos($this->drupalGetHeader('Cache-Control'), 'private'), 'Cache-Control header set to "private".'); - $this->assertEqual('no-store, content="BigPipe/1.0"', $this->drupalGetHeader('Surrogate-Control')); - $this->assertEqual('no', $this->drupalGetHeader('X-Accel-Buffering')); + $this->assertEquals('no-store, content="BigPipe/1.0"', $this->drupalGetHeader('Surrogate-Control')); + $this->assertEquals('no', $this->drupalGetHeader('X-Accel-Buffering')); } /** @@ -363,28 +363,28 @@ protected function assertBigPipePlaceholders(array $expected_big_pipe_placeholde $expected_placeholder_replacement = ''); - $this->assertEqual($f, '', 'HTML corrector -- CDATA added to script element'); $f = Html::normalize('

'); - $this->assertEqual($f, '

', 'HTML corrector -- CDATA added to a nested script element'); $f = Html::normalize('

'); - $this->assertEqual($f, '

'); - $this->assertEqual($filtered_data, '

'); - $this->assertEqual($filtered_data, '