mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-07 08:05:25 +02:00
[ticket/14036] Replace path_helper with a mock
PHPBB3-14036
This commit is contained in:
parent
39f3313534
commit
ca141f2e1e
@ -435,20 +435,15 @@ class phpbb_test_case_helpers
|
|||||||
// Create a path_helper
|
// Create a path_helper
|
||||||
if (!$container->has('path_helper') || $container->getDefinition('path_helper')->isSynthetic())
|
if (!$container->has('path_helper') || $container->getDefinition('path_helper')->isSynthetic())
|
||||||
{
|
{
|
||||||
$path_helper = new \phpbb\path_helper(
|
$path_helper = $this->test_case->getMockBuilder('phpbb\\path_helper')
|
||||||
new \phpbb\symfony_request(
|
->disableOriginalConstructor()
|
||||||
new phpbb_mock_request()
|
->setMethods(array('get_web_root_path'))
|
||||||
),
|
->getMock();
|
||||||
new \phpbb\filesystem(),
|
$path_helper->expects($this->test_case->any())
|
||||||
$this->test_case->getMock('\phpbb\request\request'),
|
->method('get_web_root_path')
|
||||||
$phpbb_root_path,
|
->will($this->test_case->returnValue('./'));
|
||||||
$phpEx
|
|
||||||
);
|
|
||||||
|
|
||||||
$container->set(
|
$container->set('path_helper', $path_helper);
|
||||||
'path_helper',
|
|
||||||
$path_helper
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user