Commit f56797a7 authored by catch's avatar catch
Browse files

Issue #3193955 by mondrake, anmolgoyal74, daffie: Swap assertEqual arguments...

Issue #3193955 by mondrake, anmolgoyal74, daffie: Swap assertEqual arguments in preparation to replace with assertEquals
parent 0ed3b073
Loading
Loading
Loading
Loading
+3 −3
Changes for core/modules/aggregator/tests/src/Functional/FeedLanguageTest.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -77,8 +77,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->assertEqual($this->langcodes[1], $feeds[1]->language()->getId());
    $this->assertEqual($this->langcodes[2], $feeds[2]->language()->getId());

    // Create example nodes to create feed items from and then update the feeds.
    $this->createSampleNodes();
@@ -92,7 +92,7 @@ public function testFeedLanguage() {
      // Verify that the feed items were created.
      $this->assertNotEmpty($items);
      foreach ($items as $item) {
        $this->assertEqual($item->language()->getId(), $feed->language()->getId());
        $this->assertEqual($feed->language()->getId(), $item->language()->getId());
      }
    }
  }
+1 −1
Changes for core/modules/aggregator/tests/src/Functional/FeedParserTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ public function testRedirectFeed() {
    $feed->refreshItems();

    // Make sure that the feed URL was updated correctly.
    $this->assertEqual($feed->getUrl(), Url::fromRoute('aggregator_test.feed', [], ['absolute' => TRUE])->toString());
    $this->assertEqual(Url::fromRoute('aggregator_test.feed', [], ['absolute' => TRUE])->toString(), $feed->getUrl());
  }

  /**
+1 −1
Changes for core/modules/aggregator/tests/src/Functional/FeedProcessorPluginTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -66,7 +66,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->assertEqual(3600, $feed->getRefreshRate());
  }

}
+1 −1
Changes for core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ protected function submitImportForm() {
    $this->assertRaw(t('A feed named %title already exists.', ['%title' => $feeds[1]['title[0][value]']]));

    $after = $count_query->execute();
    $this->assertEqual($after, 2, 'Verifying that two distinct feeds were added.');
    $this->assertEqual(2, $after, 'Verifying that two distinct feeds were added.');

    $feed_entities = Feed::loadMultiple();
    $refresh = TRUE;
+4 −8
Changes for core/modules/aggregator/tests/src/Kernel/FeedValidationTest.php: 4 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -54,14 +54,10 @@ public function testValidation() {
    $violations = $feed->validate();

    $this->assertCount(2, $violations);
    $this->assertEqual($violations[0]->getPropertyPath(), 'title');
    $this->assertEqual($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.', [
      '%value' => $feed->getUrl(),
    ]));
    $this->assertEqual('title', $violations[0]->getPropertyPath());
    $this->assertEqual(t('A feed named %value already exists. Enter a unique title.', ['%value' => $feed->label()]), $violations[0]->getMessage());
    $this->assertEqual('url', $violations[1]->getPropertyPath());
    $this->assertEqual(t('A feed with this URL %value already exists. Enter a unique URL.', ['%value' => $feed->getUrl()]), $violations[1]->getMessage());
  }

}
Loading