1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-05 22:14:59 +02:00

Merge pull request #6354 from marc1706/ticket/16950

[ticket/16950] Make download_test URLs work without URL rewrite
This commit is contained in:
Marc Alexander 2022-01-15 13:27:00 +01:00 committed by GitHub
commit d17ead1b03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
));
// Download attachment as guest
$crawler = self::request('GET', "download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
$crawler = self::request('GET', "app.php/download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
self::assert_response_status_code(200);
$content = self::$client->getResponse()->getContent();
$finfo = new finfo(FILEINFO_MIME_TYPE);
@ -141,7 +141,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
$this->add_lang('viewtopic');
// No download attachment as guest
$crawler = self::request('GET', "download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
$crawler = self::request('GET', "app.php/download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
self::assert_response_html(404);
$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();
// Download attachment as admin
$crawler = self::request('GET', "download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
$crawler = self::request('GET', "app.php/download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
self::assert_response_status_code(200);
$content = self::$client->getResponse()->getContent();
$finfo = new finfo(FILEINFO_MIME_TYPE);
@ -208,7 +208,7 @@ class phpbb_functional_download_test extends phpbb_functional_test_case
$this->add_lang('viewtopic');
// No download attachment as guest
$crawler = self::request('GET', "download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
$crawler = self::request('GET', "app.php/download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
self::assert_response_html(404);
$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();
// Download attachment as admin
$crawler = self::request('GET', "download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
$crawler = self::request('GET', "app.php/download/attachment/{$this->data['attachments'][$this->data['posts']['Re: Download Topic #1-#2']]}", array(), false);
self::assert_response_status_code(200);
$content = self::$client->getResponse()->getContent();
$finfo = new finfo(FILEINFO_MIME_TYPE);