From f70e0c2349554f4099f56e6308aaef514797c055 Mon Sep 17 00:00:00 2001 From: flashwave Date: Wed, 16 May 2018 20:28:56 +0200 Subject: [PATCH] Fix various errors. --- src/IO/Directory.php | 2 +- tests/ZalgoTest.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/IO/Directory.php b/src/IO/Directory.php index e1332c8e..f45518bf 100644 --- a/src/IO/Directory.php +++ b/src/IO/Directory.php @@ -102,7 +102,7 @@ class Directory foreach ($split_path as $path_part) { $existing_path .= $path_part . self::SEPARATOR; - if ($on_windows && substr($existing_path, 1, 2) === ':\\') { + if ($on_windows && substr($path_part, 1, 2) === ':\\') { continue; } diff --git a/tests/ZalgoTest.php b/tests/ZalgoTest.php index c3eff2d6..30c9eabb 100644 --- a/tests/ZalgoTest.php +++ b/tests/ZalgoTest.php @@ -2,7 +2,6 @@ namespace MisuzuTests; use PHPUnit\Framework\TestCase; -use Misuzu\Zalgo; class ZalgoTest extends TestCase { @@ -12,17 +11,17 @@ class ZalgoTest extends TestCase { $this->assertEquals( static::TEST_STRING, - Zalgo::strip(Zalgo::run(static::TEST_STRING, Zalgo::ZALGO_MODE_MINI)) + zalgo_strip(zalgo_run(static::TEST_STRING, MSZ_ZALGO_MODE_MINI)) ); $this->assertEquals( static::TEST_STRING, - Zalgo::strip(Zalgo::run(static::TEST_STRING, Zalgo::ZALGO_MODE_NORMAL)) + zalgo_strip(zalgo_run(static::TEST_STRING, MSZ_ZALGO_MODE_NORMAL)) ); $this->assertEquals( static::TEST_STRING, - Zalgo::strip(Zalgo::run(static::TEST_STRING, Zalgo::ZALGO_MODE_MAX)) + zalgo_strip(zalgo_run(static::TEST_STRING, MSZ_ZALGO_MODE_MAX)) ); } }