Skip to content
Snippets Groups Projects
Commit eeb7b53e authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #601938 by mfb: fixed some forum exceptions and added tests.

parent 07eee25a
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -902,7 +902,7 @@ public function getMetaData($key) {
/* Implementations of QueryConditionInterface for the WHERE clause. */
public function condition($field, $value = NULL, $operator = '=') {
public function condition($field, $value = NULL, $operator = NULL) {
if (!isset($num_args)) {
$num_args = func_num_args();
}
......
......@@ -254,9 +254,7 @@ function forum_update_7001() {
'taxonomy_term_data' => 'tid',
),
);
db_create_table($ret, 'forum_index', $forum_index);
db_create_table('forum_index', $forum_index);
db_query('INSERT INTO {forum_index} (SELECT n.nid, n.title, f.tid, n.sticky, n.created, ncs.last_comment_timestamp, ncs.comment_count FROM {node} n INNER JOIN {forum} f on n.vid = f.vid INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid)');
return $ret;
}
......@@ -68,6 +68,13 @@ class ForumTestCase extends DrupalWebTestCase {
$this->drupalGet('forum');
$this->assertRaw("<td class=\"topics\">\n 6 </td>");
$this->assertRaw('<td class="posts">6</td>');
// Test loading multiple forum nodes on the front page.
$this->drupalLogin($this->drupalCreateUser(array('administer content types', 'create forum content')));
$this->drupalPost('admin/structure/types/manage/forum', array('node_options[promote]' => 'promote'), t('Save content type'));
$this->createForumTopic($this->forum, FALSE);
$this->createForumTopic($this->forum, FALSE);
$this->drupalGet('node');
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment