Unverified Commit 97b61dac authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3131281 by mondrake, longwave, rahulrasgon, ridhimaabrol24,...

Issue #3131281 by mondrake, longwave, rahulrasgon, ridhimaabrol24, naresh_bavaskar, Spokje, paulocs, jungle, daffie: Replace assertEqual() with assertEquals()
parent dd3d8d64
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -31,20 +31,20 @@ public function testCron() {
      ->count();

    $this->cronRun();
    $this->assertEqual(5, $count_query->execute());
    $this->assertEquals(5, $count_query->execute());
    $this->deleteFeedItems($feed);
    $this->assertEqual(0, $count_query->execute());
    $this->assertEquals(0, $count_query->execute());
    $this->cronRun();
    $this->assertEqual(5, $count_query->execute());
    $this->assertEquals(5, $count_query->execute());

    // Test feed locking when queued for update.
    $this->deleteFeedItems($feed);
    $feed->setQueuedTime(REQUEST_TIME)->save();
    $this->cronRun();
    $this->assertEqual(0, $count_query->execute());
    $this->assertEquals(0, $count_query->execute());
    $feed->setQueuedTime(0)->save();
    $this->cronRun();
    $this->assertEqual(5, $count_query->execute());
    $this->assertEquals(5, $count_query->execute());
  }

}
+1 −1
Original line number Diff line number Diff line
@@ -208,7 +208,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, new FormattableMarkup('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, new FormattableMarkup('Total items in feed equal to the total items in database (@val1 != @val2)', ['@val1' => $expected_count, '@val2' => $feed->item_count]));
    }
  }

+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ public function testDeleteFeed() {
    $this->assertText($feed2->label());
    $block_storage = $this->container->get('entity_type.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());
+3 −3
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($this->langcodes[1], $feeds[1]->language()->getId());
    $this->assertEqual($this->langcodes[2], $feeds[2]->language()->getId());
    $this->assertEquals($this->langcodes[1], $feeds[1]->language()->getId());
    $this->assertEquals($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($feed->language()->getId(), $item->language()->getId());
        $this->assertEquals($feed->language()->getId(), $item->language()->getId());
      }
    }
  }
+3 −3
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ public function testAtomSample() {
      ->condition('link', 'http://example.org/2003/12/13/atom03')
      ->execute();
    $item = Item::load(array_values($item_ids)[0]);
    $this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', $item->getGuid(), 'Atom entry id element is parsed correctly.');
    $this->assertEquals('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', $item->getGuid(), 'Atom entry id element is parsed correctly.');

    // Check for second feed entry.
    $this->assertText('We tried to stop them, but we failed.');
@@ -80,7 +80,7 @@ public function testAtomSample() {
      ->condition('link', 'http://example.org/2003/12/14/atom03')
      ->execute();
    $item = Item::load(array_values($item_ids)[0]);
    $this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-bbbb-80da344efa6a', $item->getGuid(), 'Atom entry id element is parsed correctly.');
    $this->assertEquals('urn:uuid:1225c695-cfb8-4ebb-bbbb-80da344efa6a', $item->getGuid(), 'Atom entry id element is parsed correctly.');
  }

  /**
@@ -104,7 +104,7 @@ public function testRedirectFeed() {
    $feed->refreshItems();

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

  /**
Loading