mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 17:56:52 +02:00
[ticket/15253] Update imports
PHPBB3-15253
This commit is contained in:
@@ -17,6 +17,7 @@ use phpbb\extension\di\extension_base;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
use phpbb\filesystem\helper as filesystem_helper;
|
||||
|
||||
/**
|
||||
* Container core extension
|
||||
@@ -25,7 +26,7 @@ class extension extends extension_base
|
||||
{
|
||||
protected function load_services(ContainerBuilder $container)
|
||||
{
|
||||
$loader = new YamlFileLoader($container, new FileLocator(\phpbb\filesystem\helper::realpath($this->ext_path)));
|
||||
$loader = new YamlFileLoader($container, new FileLocator(filesystem_helper::realpath($this->ext_path)));
|
||||
$loader->load('environment.yml');
|
||||
}
|
||||
}
|
||||
|
@@ -11,6 +11,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use phpbb\filesystem\helper as filesystem_helper;
|
||||
|
||||
class phpbb_filesystem_helper_clean_path_test extends phpbb_test_case
|
||||
{
|
||||
|
||||
@@ -47,6 +49,6 @@ class phpbb_filesystem_helper_clean_path_test extends phpbb_test_case
|
||||
*/
|
||||
public function test_clean_path($input, $expected)
|
||||
{
|
||||
$this->assertEquals($expected, \phpbb\filesystem\helper::clean_path($input));
|
||||
$this->assertEquals($expected, filesystem_helper::clean_path($input));
|
||||
}
|
||||
}
|
||||
|
@@ -11,6 +11,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use phpbb\filesystem\helper as filesystem_helper;
|
||||
|
||||
class phpbb_filesystem_helper_is_absolute_test extends phpbb_test_case
|
||||
{
|
||||
|
||||
@@ -59,6 +61,6 @@ class phpbb_filesystem_helper_is_absolute_test extends phpbb_test_case
|
||||
*/
|
||||
public function test_is_absolute($path, $expected)
|
||||
{
|
||||
$this->assertEquals($expected, \phpbb\filesystem\helper::is_absolute_path($path));
|
||||
$this->assertEquals($expected, filesystem_helper::is_absolute_path($path));
|
||||
}
|
||||
}
|
||||
|
@@ -11,6 +11,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use phpbb\filesystem\helper as filesystem_helper;
|
||||
|
||||
class phpbb_filesystem_helper_realpath_test extends phpbb_test_case
|
||||
{
|
||||
protected static $filesystem_helper_phpbb_own_realpath;
|
||||
@@ -19,7 +21,7 @@ class phpbb_filesystem_helper_realpath_test extends phpbb_test_case
|
||||
{
|
||||
parent::setUpBeforeClass();
|
||||
|
||||
self::$filesystem_helper_phpbb_own_realpath = new ReflectionMethod('\phpbb\filesystem\helper', 'phpbb_own_realpath');
|
||||
self::$filesystem_helper_phpbb_own_realpath = new ReflectionMethod('filesystem_helper', 'phpbb_own_realpath');
|
||||
self::$filesystem_helper_phpbb_own_realpath->setAccessible(true);
|
||||
}
|
||||
|
||||
@@ -49,7 +51,7 @@ class phpbb_filesystem_helper_realpath_test extends phpbb_test_case
|
||||
return array();
|
||||
}
|
||||
|
||||
$relative_path = \phpbb\filesystem\helper::make_path_relative(__DIR__, getcwd());
|
||||
$relative_path = filesystem_helper::make_path_relative(__DIR__, getcwd());
|
||||
|
||||
return array(
|
||||
array($relative_path, __DIR__),
|
||||
|
@@ -11,6 +11,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use phpbb\filesystem\helper as filesystem_helper;
|
||||
|
||||
class phpbb_path_helper_test extends phpbb_test_case
|
||||
{
|
||||
/** @var \phpbb\path_helper */
|
||||
@@ -43,7 +45,7 @@ class phpbb_path_helper_test extends phpbb_test_case
|
||||
*/
|
||||
public function set_phpbb_root_path()
|
||||
{
|
||||
$this->phpbb_root_path = \phpbb\filesystem\helper::clean_path(dirname(__FILE__) . '/../../phpBB/');
|
||||
$this->phpbb_root_path = filesystem_helper::clean_path(dirname(__FILE__) . '/../../phpBB/');
|
||||
}
|
||||
|
||||
public function test_get_web_root_path()
|
||||
@@ -72,7 +74,7 @@ class phpbb_path_helper_test extends phpbb_test_case
|
||||
),
|
||||
array(
|
||||
$this->phpbb_root_path . $this->phpbb_root_path . 'test.php',
|
||||
\phpbb\filesystem\helper::clean_path($this->phpbb_root_path . $this->phpbb_root_path . 'test.php'),
|
||||
filesystem_helper::clean_path($this->phpbb_root_path . $this->phpbb_root_path . 'test.php'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@@ -11,6 +11,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use phpbb\filesystem\helper as filesystem_helper;
|
||||
|
||||
require_once dirname(__FILE__) . '/template_test_case.php';
|
||||
|
||||
class phpbb_template_includephp_test extends phpbb_template_template_test_case
|
||||
@@ -40,7 +42,7 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case
|
||||
global $phpbb_root_path;
|
||||
|
||||
$path_to_php = str_replace('\\', '/', dirname(__FILE__)) . '/templates/_dummy_include.php.inc';
|
||||
$this->assertTrue(\phpbb\filesystem\helper::is_absolute_path($path_to_php));
|
||||
$this->assertTrue(filesystem_helper::is_absolute_path($path_to_php));
|
||||
$template_text = "Path is absolute.\n<!-- INCLUDEPHP $path_to_php -->";
|
||||
|
||||
$cache_dir = $phpbb_root_path . 'cache/';
|
||||
|
Reference in New Issue
Block a user