diff --git a/core/modules/aggregator/src/Tests/AggregatorAdminTest.php b/core/modules/aggregator/src/Tests/AggregatorAdminTest.php deleted file mode 100644 index 9bdfd1c..0000000 --- a/core/modules/aggregator/src/Tests/AggregatorAdminTest.php +++ /dev/null @@ -1,41 +0,0 @@ -createFeed($this->getRSS091Sample()); - $this->drupalGet('admin/config/services/aggregator'); - - $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'); - // Check if the fields in the table match with what's expected. - $this->assertEqual($feed->label(), (string) $result[0]->td[0]->a); - $count = $this->container->get('entity.manager')->getStorage('aggregator_item')->getItemCount($feed); - $this->assertEqual(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), (string) $result[0]->td[1]); - - // Update the items of the first feed. - $feed->refreshItems(); - $this->drupalGet('admin/config/services/aggregator'); - $result = $this->xpath('//table/tbody/tr'); - // Check if the fields in the table match with what's expected. - $this->assertEqual($feed->label(), (string) $result[0]->td[0]->a); - $count = $this->container->get('entity.manager')->getStorage('aggregator_item')->getItemCount($feed); - $this->assertEqual(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), (string) $result[0]->td[1]); - } -} diff --git a/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php b/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php index d622582..8286045 100644 --- a/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php +++ b/core/modules/aggregator/src/Tests/AggregatorConfigurationTest.php @@ -2,17 +2,18 @@ /** * @file - * Definition of Drupal\aggregator\Tests\AggregatorConfigurationTest. + * Contains \Drupal\aggregator\Tests\AggregatorConfigurationTest. */ namespace Drupal\aggregator\Tests; /** - * Tests aggregator settings page. + * Tests aggregator configuration pages. * * @group aggregator */ class AggregatorConfigurationTest extends AggregatorTestBase { + /** * Tests the settings form to ensure the correct default values are used. */ @@ -59,4 +60,29 @@ public function testSettingsPage() { $this->drupalGet('admin/config/services/aggregator/settings'); $this->assertResponse(200); } + + /** + * Tests the overview page. + */ + function testOverviewPage() { + $feed = $this->createFeed($this->getRSS091Sample()); + $this->drupalGet('admin/config/services/aggregator'); + + $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'); + // Check if the fields in the table match with what's expected. + $this->assertEqual($feed->label(), (string) $result[0]->td[0]->a); + $count = $this->container->get('entity.manager')->getStorage('aggregator_item')->getItemCount($feed); + $this->assertEqual(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), (string) $result[0]->td[1]); + + // Update the items of the first feed. + $feed->refreshItems(); + $this->drupalGet('admin/config/services/aggregator'); + $result = $this->xpath('//table/tbody/tr'); + // Check if the fields in the table match with what's expected. + $this->assertEqual($feed->label(), (string) $result[0]->td[0]->a); + $count = $this->container->get('entity.manager')->getStorage('aggregator_item')->getItemCount($feed); + $this->assertEqual(\Drupal::translation()->formatPlural($count, '1 item', '@count items'), (string) $result[0]->td[1]); + } }