diff options
| author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-07-19 22:20:23 +0200 | 
|---|---|---|
| committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-07-19 22:20:23 +0200 | 
| commit | 4c687194bf80be11561b4d44a10eb436cbc037df (patch) | |
| tree | 5d598122e2e679aa6175bef8099d510c2621bc90 | |
| parent | 39f3313534f63c720da31b4deb726cb5d8a5d3ae (diff) | |
| parent | 6cc2510cee581370ed103a87f2c38d2aee282641 (diff) | |
| download | forums-4c687194bf80be11561b4d44a10eb436cbc037df.tar forums-4c687194bf80be11561b4d44a10eb436cbc037df.tar.gz forums-4c687194bf80be11561b4d44a10eb436cbc037df.tar.bz2 forums-4c687194bf80be11561b4d44a10eb436cbc037df.tar.xz forums-4c687194bf80be11561b4d44a10eb436cbc037df.zip | |
Merge pull request #3778 from s9e/ticket/14036
[ticket/14036] Replace path_helper with a mock
* s9e/ticket/14036:
  [ticket/14036] Fixed mocked web root path
  [ticket/14036] Replace path_helper with a mock
| -rw-r--r-- | tests/test_framework/phpbb_test_case_helpers.php | 23 | 
1 files changed, 9 insertions, 14 deletions
| diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php index 70bd309653..c0f278c130 100644 --- a/tests/test_framework/phpbb_test_case_helpers.php +++ b/tests/test_framework/phpbb_test_case_helpers.php @@ -435,20 +435,15 @@ class phpbb_test_case_helpers  		// Create a path_helper  		if (!$container->has('path_helper') || $container->getDefinition('path_helper')->isSynthetic())  		{ -			$path_helper = new \phpbb\path_helper( -				new \phpbb\symfony_request( -					new phpbb_mock_request() -				), -				new \phpbb\filesystem(), -				$this->test_case->getMock('\phpbb\request\request'), -				$phpbb_root_path, -				$phpEx -			); - -			$container->set( -				'path_helper', -				$path_helper -			); +			$path_helper = $this->test_case->getMockBuilder('phpbb\\path_helper') +				->disableOriginalConstructor() +				->setMethods(array('get_web_root_path')) +				->getMock(); +			$path_helper->expects($this->test_case->any()) +				->method('get_web_root_path') +				->will($this->test_case->returnValue('phpBB/')); + +			$container->set('path_helper', $path_helper);  		}  		else  		{ | 
