mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17363] Add functional test
PHPBB-17363 Signed-off-by: Matt Friedman <maf675@gmail.com>
This commit is contained in:
parent
d651cccc76
commit
fe40b0d3a3
1 changed files with 47 additions and 0 deletions
47
tests/functional/manifest_test.php
Normal file
47
tests/functional/manifest_test.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @group functional
|
||||
*/
|
||||
class phpbb_functional_manifest_test extends phpbb_functional_test_case
|
||||
{
|
||||
public function test_manifest()
|
||||
{
|
||||
$expected = [
|
||||
'name' => 'yourdomain.com',
|
||||
'short_name' => 'yourdomain',
|
||||
'display' => 'standalone',
|
||||
'orientation' => 'portrait',
|
||||
'dir' => 'ltr',
|
||||
'start_url' => '/',
|
||||
'scope' => '/',
|
||||
];
|
||||
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_board&mode=settings&sid=' . $this->sid);
|
||||
|
||||
$form_data = [
|
||||
'config[sitename]' => $expected['name'],
|
||||
'config[sitename_short]' => $expected['short_name'],
|
||||
];
|
||||
$form = $crawler->selectButton('submit')->form($form_data);
|
||||
$crawler = self::submit($form);
|
||||
$this->assertStringContainsString($this->lang('CONFIG_UPDATED'), $crawler->filter('.successbox')->text());
|
||||
|
||||
self::request('GET', 'app.php/manifest', [], false);
|
||||
$this->assertEquals(json_encode($expected), self::get_content());
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue