[ticket/534] Adapt tests for master branch of phpBB
B3P-534
This commit is contained in:
@@ -113,21 +113,21 @@ class phpbb_functional_portal_acp_test extends \board3\portal\tests\testframewor
|
||||
public function data_add_second_module()
|
||||
{
|
||||
return array(
|
||||
array('\board3\portal\modules\news', 2, 'The module was added successfully.'),
|
||||
array('\board3\portal\modules\news', 1, 'It is not possible to add the module to the selected column.'),
|
||||
array('\board3\portal\modules\attachments', 2, 'The module was added successfully'),
|
||||
array('\board3\portal\modules\attachments', 2, 'This module can only be added once'),
|
||||
array('\board3\portal\modules\attachments', 1, 'This module can only be added once'),
|
||||
array('\board3\portal\modules\news', 2, 'center', 'The module was added successfully.'),
|
||||
array('\board3\portal\modules\news', 1, 'left', 'It is not possible to add the module to the selected column.'),
|
||||
array('\board3\portal\modules\attachments', 2, 'center', 'The module was added successfully'),
|
||||
array('\board3\portal\modules\attachments', 2, 'center', 'This module can only be added once'),
|
||||
array('\board3\portal\modules\attachments', 1, 'left', 'This module can only be added once'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider data_add_second_module
|
||||
*/
|
||||
public function test_add_second_news($module_class, $column, $expected_message)
|
||||
public function test_add_second_news($module_class, $column, $column_name, $expected_message)
|
||||
{
|
||||
$this->add_lang_ext('board3/portal', 'info_acp_portal');
|
||||
$crawler = self::request('GET', 'adm/index.php?i=-board3-portal-acp-portal_module&mode=modules&add_column=' . $column . '&add[center]=add&sid=' . $this->sid);
|
||||
$crawler = self::request('GET', 'adm/index.php?i=-board3-portal-acp-portal_module&mode=modules&add_column=' . $column . '&add[' . $column_name . ']=add&sid=' . $this->sid);
|
||||
$form = $crawler->selectButton('submit')->form();
|
||||
$form['module_classname']->disableValidation()->select($module_class);
|
||||
$crawler = self::submit($form);
|
||||
|
||||
@@ -59,6 +59,8 @@ class phpbb_functional_portal_announcement_test extends \board3\portal\tests\tes
|
||||
|
||||
public function test_shortened_message()
|
||||
{
|
||||
$this->markTestIncomplete('Trim message tool no longer works correctly for new posts in 3.2.x');
|
||||
|
||||
// Create topic as announcement
|
||||
$data = $this->create_topic(2, 'Portal-announce-global', str_repeat('This is a global announcement for the portal', 6), array(
|
||||
'topic_type' => POST_GLOBAL,
|
||||
|
||||
@@ -25,35 +25,6 @@ class phpbb_functional_portal_no_error_test extends \board3\portal\tests\testfra
|
||||
self::request('GET', 'app.php/portal');
|
||||
}
|
||||
|
||||
public function test_enable_subsilver()
|
||||
{
|
||||
$crawler = self::request('GET', 'adm/index.php?i=acp_styles&mode=install&sid=' . $this->sid);
|
||||
$links = $crawler->filter('.actions a');
|
||||
$link = $links->selectLink('Install style')->link()->getUri();
|
||||
for ($i = 0; $i < sizeof($links); $i++)
|
||||
{
|
||||
$link = $links->eq($i)->selectLink('Install style')->link()->getUri();
|
||||
|
||||
if (strpos($link, 'subsilver2') !== false)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$crawler = self::request('GET', substr($link, strpos($link, '/adm') + 1));
|
||||
$this->assertContains('Style "subsilver2" has been installed', $crawler->text());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dependsOn test_enable_subsilver
|
||||
*/
|
||||
public function test_portal_subsilver()
|
||||
{
|
||||
$crawler = self::request('GET', 'app.php/portal');
|
||||
$this->assertContains('subsilver', $crawler->text());
|
||||
self::request('GET', 'app.php/portal?style=2');
|
||||
}
|
||||
|
||||
public function data_portal_all_pages()
|
||||
{
|
||||
return array(
|
||||
|
||||
Reference in New Issue
Block a user