mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 07:18:08 +02:00
[ticket/14284] Update routes
PHPBB3-14285
This commit is contained in:
@@ -83,7 +83,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
|
|||||||
));
|
));
|
||||||
|
|
||||||
// Download attachment as guest
|
// Download attachment as guest
|
||||||
$crawler = self::request('GET', "download/file.php?id={$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
|
$crawler = self::request('GET', "download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
|
||||||
self::assert_response_status_code(200);
|
self::assert_response_status_code(200);
|
||||||
$content = self::$client->getResponse()->getContent();
|
$content = self::$client->getResponse()->getContent();
|
||||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||||
@@ -141,7 +141,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
|
|||||||
$this->add_lang('viewtopic');
|
$this->add_lang('viewtopic');
|
||||||
|
|
||||||
// No download attachment as guest
|
// No download attachment as guest
|
||||||
$crawler = self::request('GET', "download/file.php?id={$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
|
$crawler = self::request('GET', "download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
|
||||||
self::assert_response_html(404);
|
self::assert_response_html(404);
|
||||||
$this->assertContainsLang('ERROR_NO_ATTACHMENT', $crawler->filter('#message')->text());
|
$this->assertContainsLang('ERROR_NO_ATTACHMENT', $crawler->filter('#message')->text());
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
|
|||||||
$this->login();
|
$this->login();
|
||||||
|
|
||||||
// Download attachment as admin
|
// Download attachment as admin
|
||||||
$crawler = self::request('GET', "download/file.php?id={$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
|
$crawler = self::request('GET', "download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
|
||||||
self::assert_response_status_code(200);
|
self::assert_response_status_code(200);
|
||||||
$content = self::$client->getResponse()->getContent();
|
$content = self::$client->getResponse()->getContent();
|
||||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||||
@@ -208,7 +208,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
|
|||||||
$this->add_lang('viewtopic');
|
$this->add_lang('viewtopic');
|
||||||
|
|
||||||
// No download attachment as guest
|
// No download attachment as guest
|
||||||
$crawler = self::request('GET', "download/file.php?id={$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
|
$crawler = self::request('GET', "download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
|
||||||
self::assert_response_html(404);
|
self::assert_response_html(404);
|
||||||
$this->assertContainsLang('ERROR_NO_ATTACHMENT', $crawler->filter('#message')->text());
|
$this->assertContainsLang('ERROR_NO_ATTACHMENT', $crawler->filter('#message')->text());
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
|
|||||||
$this->login();
|
$this->login();
|
||||||
|
|
||||||
// Download attachment as admin
|
// Download attachment as admin
|
||||||
$crawler = self::request('GET', "download/file.php?id={$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
|
$crawler = self::request('GET', "download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
|
||||||
self::assert_response_status_code(200);
|
self::assert_response_status_code(200);
|
||||||
$content = self::$client->getResponse()->getContent();
|
$content = self::$client->getResponse()->getContent();
|
||||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||||
|
@@ -1417,7 +1417,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
|
|||||||
$content = $crawler->filterXPath("//entry[{$entry_id}]/content")->text();
|
$content = $crawler->filterXPath("//entry[{$entry_id}]/content")->text();
|
||||||
foreach ($attachments as $i => $attachment)
|
foreach ($attachments as $i => $attachment)
|
||||||
{
|
{
|
||||||
$url = self::$root_url . "download/file.php?id={$attachment['id']}";
|
$url = self::$root_url . "download/attachment/{$attachment['id']}";
|
||||||
$string = "Attachment #{$i}";
|
$string = "Attachment #{$i}";
|
||||||
|
|
||||||
if ($attachment['displayed'])
|
if ($attachment['displayed'])
|
||||||
|
Reference in New Issue
Block a user