aboutsummaryrefslogtreecommitdiffstats
path: root/tests/filesystem
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-09-26 15:34:44 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-09-26 15:34:44 +0200
commit7525c49d454e1ff4a156709ea9ecc1dc0b28dd6e (patch)
tree9a7cf0bb2f985be79c51d4d0a1743a90b5532404 /tests/filesystem
parente8303bc3199081d1f9f0679d3b98298ccdc49deb (diff)
downloadforums-7525c49d454e1ff4a156709ea9ecc1dc0b28dd6e.tar
forums-7525c49d454e1ff4a156709ea9ecc1dc0b28dd6e.tar.gz
forums-7525c49d454e1ff4a156709ea9ecc1dc0b28dd6e.tar.bz2
forums-7525c49d454e1ff4a156709ea9ecc1dc0b28dd6e.tar.xz
forums-7525c49d454e1ff4a156709ea9ecc1dc0b28dd6e.zip
[ticket/11852] Split filesystem and path_helper into 2 classes
PHPBB3-11852
Diffstat (limited to 'tests/filesystem')
-rw-r--r--tests/filesystem/clean_path_test.php8
-rw-r--r--tests/filesystem/web_root_path_test.php12
2 files changed, 8 insertions, 12 deletions
diff --git a/tests/filesystem/clean_path_test.php b/tests/filesystem/clean_path_test.php
index 5b9857ef2c..fedadc103b 100644
--- a/tests/filesystem/clean_path_test.php
+++ b/tests/filesystem/clean_path_test.php
@@ -14,13 +14,7 @@ class phpbb_filesystem_clean_path_test extends phpbb_test_case
public function setUp()
{
parent::setUp();
- $this->filesystem = new \phpbb\filesystem(
- new \phpbb\symfony_request(
- new phpbb_mock_request()
- ),
- dirname(__FILE__) . './../../phpBB/',
- 'php'
- );
+ $this->filesystem = new \phpbb\filesystem();
}
public function clean_path_data()
diff --git a/tests/filesystem/web_root_path_test.php b/tests/filesystem/web_root_path_test.php
index e0f716cdae..ebc99669ce 100644
--- a/tests/filesystem/web_root_path_test.php
+++ b/tests/filesystem/web_root_path_test.php
@@ -18,10 +18,11 @@ class phpbb_filesystem_web_root_path_test extends phpbb_test_case
$this->set_phpbb_root_path();
- $this->filesystem = new \phpbb\filesystem(
+ $this->path_helper = new \phpbb\path_helper(
new \phpbb\symfony_request(
new phpbb_mock_request()
),
+ new \phpbb\filesystem(),
$this->phpbb_root_path,
'php'
);
@@ -43,7 +44,7 @@ class phpbb_filesystem_web_root_path_test extends phpbb_test_case
public function test_get_web_root_path()
{
// Symfony Request = null, so always should return phpbb_root_path
- $this->assertEquals($this->phpbb_root_path, $this->filesystem->get_web_root_path());
+ $this->assertEquals($this->phpbb_root_path, $this->path_helper->get_web_root_path());
}
public function basic_update_web_root_path_data()
@@ -71,7 +72,7 @@ class phpbb_filesystem_web_root_path_test extends phpbb_test_case
*/
public function test_basic_update_web_root_path($input, $expected)
{
- $this->assertEquals($expected, $this->filesystem->update_web_root_path($input, $symfony_request));
+ $this->assertEquals($expected, $this->path_helper->update_web_root_path($input, $symfony_request));
}
public function update_web_root_path_data()
@@ -131,12 +132,13 @@ class phpbb_filesystem_web_root_path_test extends phpbb_test_case
->method('getScriptName')
->will($this->returnValue($getScriptName));
- $filesystem = new \phpbb\filesystem(
+ $path_helper = new \phpbb\path_helper(
$symfony_request,
+ new \phpbb\filesystem(),
$this->phpbb_root_path,
'php'
);
- $this->assertEquals($expected, $filesystem->update_web_root_path($input, $symfony_request));
+ $this->assertEquals($expected, $path_helper->update_web_root_path($input, $symfony_request));
}
}