From 060eb35f0ae4cde353a0048a6da0818b2fd5fb35 Mon Sep 17 00:00:00 2001 From: webchick Date: Sat, 28 Apr 2012 23:08:34 -0700 Subject: Issue #1058754 by Yaron Tal, kathyh, naxoc, xjm, tim.plunkett: Fixed Attempt to loop through undefined result set in aggregator. --- modules/aggregator/aggregator.test | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules/aggregator/aggregator.test') diff --git a/modules/aggregator/aggregator.test b/modules/aggregator/aggregator.test index 5609d68ae..77b60cb93 100644 --- a/modules/aggregator/aggregator.test +++ b/modules/aggregator/aggregator.test @@ -848,6 +848,16 @@ class AggregatorRenderingTestCase extends AggregatorTestCase { $this->drupalGet($href); $correct_titles = $this->xpath('//h1[normalize-space(text())=:title]', array(':title' => $feed->title)); $this->assertFalse(empty($correct_titles), t('Aggregator feed page is available and has the correct title.')); + + // Set the number of news items to 0 to test that the block does not show + // up. + $feed->block = 0; + aggregator_save_feed((array) $feed); + // It is nescessary to flush the cache after saving the number of items. + drupal_flush_all_caches(); + // Check that the block is no longer displayed. + $this->drupalGet('node'); + $this->assertNoText(t($block['title']), 'Feed block is not displayed on the page when number of items is set to 0.'); } /** -- cgit v1.2.3