Commit 5c1869b6 authored by webchick's avatar webchick

Issue #2228941 by larowlan, andrei.dincu | Cottser: PHP notice displayed for...

Issue #2228941 by larowlan, andrei.dincu | Cottser: PHP notice displayed for forum blocks when there are no forum topics.
parent 27a651a6
......@@ -21,6 +21,7 @@
*/
public function build() {
$result = $this->buildForumQuery()->execute();
$elements = array();
if ($node_title_list = node_title_list($result)) {
$elements['forum_list'] = $node_title_list;
$elements['forum_more'] = array(
......
......@@ -55,13 +55,14 @@ function setUp() {
public function testNewForumTopicsBlock() {
$this->drupalLogin($this->adminUser);
// Create 5 forum topics.
$topics = $this->createForumTopics();
// Enable the new forum topics block.
$block = $this->drupalPlaceBlock('forum_new_block');
$this->drupalGet('');
// Create 5 forum topics.
$topics = $this->createForumTopics();
$this->assertLink(t('More'), 0, 'New forum topics block has a "more"-link.');
$this->assertLinkByHref('forum', 0, 'New forum topics block has a "more"-link.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment