mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/12421] Rebase and enable tests
PHPBB3-12421
This commit is contained in:
parent
f4df3f0aaf
commit
62b4e7b9d2
2 changed files with 10 additions and 13 deletions
|
@ -100,7 +100,7 @@ while ($row = $feed->get_item())
|
||||||
$published = ($feed->get('published') !== NULL) ? (int) $row[$feed->get('published')] : 0;
|
$published = ($feed->get('published') !== NULL) ? (int) $row[$feed->get('published')] : 0;
|
||||||
$updated = ($feed->get('updated') !== NULL) ? (int) $row[$feed->get('updated')] : 0;
|
$updated = ($feed->get('updated') !== NULL) ? (int) $row[$feed->get('updated')] : 0;
|
||||||
|
|
||||||
$display_attachments = ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? true : false;
|
$display_attachments = ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && isset($row['post_attachment']) && $row['post_attachment']) ? true : false;
|
||||||
|
|
||||||
$item_row = array(
|
$item_row = array(
|
||||||
'author' => ($feed->get('creator') !== NULL) ? $row[$feed->get('creator')] : '',
|
'author' => ($feed->get('creator') !== NULL) ? $row[$feed->get('creator')] : '',
|
||||||
|
|
|
@ -1195,7 +1195,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
|
||||||
|
|
||||||
public function test_create_missing_attachment_post()
|
public function test_create_missing_attachment_post()
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete('Missing attachments in posts/topics are not marked in feeds yet, see PHPBB3-12418');
|
|
||||||
$this->login();
|
$this->login();
|
||||||
$this->load_ids(array(
|
$this->load_ids(array(
|
||||||
'forums' => array(
|
'forums' => array(
|
||||||
|
@ -1216,7 +1215,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
|
||||||
|
|
||||||
public function test_feeds_missing_attachment_admin()
|
public function test_feeds_missing_attachment_admin()
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete('Missing attachments in posts/topics are not marked in feeds yet, see PHPBB3-12418');
|
|
||||||
$this->load_ids(array(
|
$this->load_ids(array(
|
||||||
'forums' => array(
|
'forums' => array(
|
||||||
'Feeds #1',
|
'Feeds #1',
|
||||||
|
@ -1252,7 +1250,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
|
||||||
),
|
),
|
||||||
'overall' => array(
|
'overall' => array(
|
||||||
array(
|
array(
|
||||||
'nb_entries' => 13,
|
'nb_entries' => 12,
|
||||||
'contents' => array(
|
'contents' => array(
|
||||||
1 => 'Attachment #0',
|
1 => 'Attachment #0',
|
||||||
),
|
),
|
||||||
|
@ -1260,12 +1258,12 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
|
||||||
),
|
),
|
||||||
'topics' => array(
|
'topics' => array(
|
||||||
array(
|
array(
|
||||||
'nb_entries' => 9,
|
'nb_entries' => 8,
|
||||||
'attachments' => array(
|
'attachments' => array(
|
||||||
1 => array( // First entry
|
1 => array( // First entry
|
||||||
array( // First attachment to fetch
|
array( // First attachment to fetch
|
||||||
'id' => $this->data['attachments'][$this->data['posts']['Feeds #1 - Topic #3']][0],
|
'id' => $this->data['attachments'][$this->data['posts']['Feeds #1 - Topic #3']][0],
|
||||||
'displayed' => false,
|
'displayed' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1273,12 +1271,12 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
|
||||||
),
|
),
|
||||||
'topics_new' => array(
|
'topics_new' => array(
|
||||||
array(
|
array(
|
||||||
'nb_entries' => 9,
|
'nb_entries' => 8,
|
||||||
'attachments' => array(
|
'attachments' => array(
|
||||||
1 => array( // First entry
|
1 => array( // First entry
|
||||||
array( // First attachment to fetch
|
array( // First attachment to fetch
|
||||||
'id' => $this->data['attachments'][$this->data['posts']['Feeds #1 - Topic #3']][0],
|
'id' => $this->data['attachments'][$this->data['posts']['Feeds #1 - Topic #3']][0],
|
||||||
'displayed' => false,
|
'displayed' => true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1286,7 +1284,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
|
||||||
),
|
),
|
||||||
'topics_active' => array(
|
'topics_active' => array(
|
||||||
array(
|
array(
|
||||||
'nb_entries' => 9,
|
'nb_entries' => 8,
|
||||||
'contents' => array(
|
'contents' => array(
|
||||||
1 => 'Attachment #0',
|
1 => 'Attachment #0',
|
||||||
),
|
),
|
||||||
|
@ -1396,13 +1394,12 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
|
||||||
if ($attachment['displayed'])
|
if ($attachment['displayed'])
|
||||||
{
|
{
|
||||||
$this->assertContains($url, $content, "Tested feed : 'feed.php{$params}'");
|
$this->assertContains($url, $content, "Tested feed : 'feed.php{$params}'");
|
||||||
// $this->assertNotContains($string, $content, "Tested feed : 'feed.php{$params}'");
|
$this->assertNotContains($string, $content, "Tested feed : 'feed.php{$params}'");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Disabled until PHPBB3-12421 is fixed and merged
|
$this->assertContains($string, $content, "Tested feed : 'feed.php{$params}'");
|
||||||
// $this->assertContains($string, $content, "Tested feed : 'feed.php{$params}'");
|
$this->assertNotContains($url, $content, "Tested feed : 'feed.php{$params}'");
|
||||||
// $this->assertNotContains($url, $content, "Tested feed : 'feed.php{$params}'");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue