[ticket/690] Update test for phpBB 3.2.0 and PHP 7.1 compatibility

B3P-690
This commit is contained in:
Marc Alexander
2017-01-08 22:09:21 +01:00
parent 2b6c85e2cf
commit 7f36382cc6
8 changed files with 91 additions and 34 deletions

View File

@@ -60,8 +60,6 @@ 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,
@@ -71,7 +69,7 @@ class phpbb_functional_portal_announcement_test extends \board3\portal\tests\tes
{
// no errors should appear on portal
$crawler = self::request('GET', 'app.php/portal');
$this->assertContains('This is a global announc [...]', $crawler->text());
$this->assertContains('This is a global announc ...', $crawler->text());
}
}
}

View File

@@ -59,8 +59,7 @@ class listener_test extends \phpbb_template_template_test_case
$manager = new \phpbb_mock_extension_manager(dirname(__FILE__) . '/', array());
$finder = new \phpbb\finder(
new \phpbb\filesystem\filesystem(),
dirname(__FILE__) . '/',
new \phpbb_mock_cache()
dirname(__FILE__) . '/'
);
$finder->set_extensions(array_keys($manager->all_enabled()));
$request = new \phpbb_mock_request();

View File

@@ -26,7 +26,7 @@ class board3_includes_modules_helper_test extends \board3\portal\tests\testframe
public function setUp()
{
global $phpbb_root_path, $phpEx;
global $phpbb_root_path, $phpEx, $phpbb_dispatcher;
parent::setUp();
@@ -37,6 +37,7 @@ class board3_includes_modules_helper_test extends \board3\portal\tests\testframe
$controller_helper->add_route('board3_portal_controller', 'portal');
$this->modules_helper = new \board3\portal\includes\modules_helper($auth, $this->config, $controller_helper, $request);
$phpbb_dispatcher = new \phpbb_mock_event_dispatcher();
}
public function data_get_disallowed_forums()