summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGeorge Petculescu <gxgpet@gmail.com>2021-05-31 12:23:32 +0200
committerGeorge Petculescu <gxgpet@gmail.com>2021-05-31 12:23:32 +0200
commit56de63c5bdfd7962d2e64d6d9b0a5b7914d4ec6c (patch)
treebe05a1326d053e22a7cf13aa99dc76b0357b351c /tests
parent5fe5a94930d58f2d6dcdda2a3b0d97978b3c3c8d (diff)
Upgrade to latest mikey179/vfsstream
Diffstat (limited to 'tests')
-rw-r--r--tests/codeigniter/helpers/file_helper_test.php5
-rw-r--r--tests/codeigniter/helpers/text_helper_test.php7
-rw-r--r--tests/mocks/ci_testcase.php2
3 files changed, 3 insertions, 11 deletions
diff --git a/tests/codeigniter/helpers/file_helper_test.php b/tests/codeigniter/helpers/file_helper_test.php
index dd74ee46b..8d7f8e1eb 100644
--- a/tests/codeigniter/helpers/file_helper_test.php
+++ b/tests/codeigniter/helpers/file_helper_test.php
@@ -6,10 +6,7 @@ class File_helper_Test extends CI_TestCase {
{
$this->helper('file');
- vfsStreamWrapper::register();
- vfsStreamWrapper::setRoot(new vfsStreamDirectory('testDir'));
-
- $this->_test_dir = vfsStreamWrapper::getRoot();
+ $this->_test_dir = vfsStream::setup('');
}
// --------------------------------------------------------------------
diff --git a/tests/codeigniter/helpers/text_helper_test.php b/tests/codeigniter/helpers/text_helper_test.php
index e51d96a29..36465f203 100644
--- a/tests/codeigniter/helpers/text_helper_test.php
+++ b/tests/codeigniter/helpers/text_helper_test.php
@@ -64,12 +64,7 @@ class Text_helper_test extends CI_TestCase {
public function test_convert_accented_characters()
{
- $path = 'application/config/foreign_chars.php';
- $this->ci_vfs_clone($path);
- if (is_php('7.4'))
- {
- copy(PROJECT_BASE.$path, APPPATH.'../'.$path);
- }
+ $this->ci_vfs_clone('application/config/foreign_chars.php');
$this->assertEquals('AAAeEEEIIOOEUUUeY', convert_accented_characters('ÀÂÄÈÊËÎÏÔŒÙÛÜŸ'));
$this->assertEquals('a e i o u n ue', convert_accented_characters('á é í ó ú ñ ü'));
}
diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php
index 8dc4682ef..fbd56af03 100644
--- a/tests/mocks/ci_testcase.php
+++ b/tests/mocks/ci_testcase.php
@@ -35,7 +35,7 @@ class CI_TestCase extends PHPUnit_Framework_TestCase {
public function setUp()
{
// Setup VFS with base directories
- $this->ci_vfs_root = vfsStream::setup();
+ $this->ci_vfs_root = vfsStream::setup('');
$this->ci_app_root = vfsStream::newDirectory('application')->at($this->ci_vfs_root);
$this->ci_base_root = vfsStream::newDirectory('system')->at($this->ci_vfs_root);
$this->ci_view_root = vfsStream::newDirectory('views')->at($this->ci_app_root);