From 52b18805939f317da48a50ed4c4b80a4a9fbe1b7 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 4 Nov 2017 15:45:54 +0100 Subject: [PATCH 1/2] [ticket/704] Update .travis.yml for travis changes B3P-704 --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8a79b4fa..048036bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: php +sudo: required +dist: precise matrix: include: @@ -16,17 +18,16 @@ matrix: env: DB=postgres - php: 5.4 env: DB=sqlite3 + - php: 5.4 + env: DB=mysqli;SLOWTESTS=1 - php: 5.5 env: DB=mysqli - php: 5.6 env: DB=mysqli - php: hhvm env: DB=mysqli - - php: 7.0 - env: DB=mysqli allow_failures: - php: hhvm - - php: 7.0 fast_finish: true env: From 5857effaddaaf4e45295d40256e4420766499917 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 4 Nov 2017 15:56:05 +0100 Subject: [PATCH 2/2] [ticket/704] Add missing phpbb_dispatcher definition for tests B3P-704 --- tests/unit/includes/modules_helper_test.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/unit/includes/modules_helper_test.php b/tests/unit/includes/modules_helper_test.php index bd56ac50..9dbbca59 100644 --- a/tests/unit/includes/modules_helper_test.php +++ b/tests/unit/includes/modules_helper_test.php @@ -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(); @@ -35,6 +35,12 @@ class board3_includes_modules_helper_test extends \board3\portal\tests\testframe $request = new \phpbb_mock_request(array('foo' => array('bar'))); $controller_helper = new \board3\portal\tests\mock\controller_helper($phpbb_root_path, $phpEx); $controller_helper->add_route('board3_portal_controller', 'portal'); + $phpbb_container = new \phpbb_mock_container_builder(); + $phpbb_dispatcher = $this->getMock('\phpbb\event\dispatcher', array('trigger_event'), array($phpbb_container)); + $phpbb_dispatcher->expects($this->any()) + ->method('trigger_event') + ->with($this->anything()) + ->will($this->returnArgument(1)); $this->modules_helper = new \board3\portal\includes\modules_helper($auth, $this->config, $controller_helper, $request); }