From c1ffef7e6efc30bb6339f98357b0998685e37931 Mon Sep 17 00:00:00 2001 From: kocoten1992 Date: Wed, 1 Jun 2022 22:06:00 +0700 Subject: [PATCH] fix: missing dot gz --- src/EncodeUtil.php | 2 +- tests/EncodeUtilTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EncodeUtil.php b/src/EncodeUtil.php index 20128a0..3a6a4af 100644 --- a/src/EncodeUtil.php +++ b/src/EncodeUtil.php @@ -24,7 +24,7 @@ public static function gzipFile( int $level = 6 ): string|false { if (is_null($dest_path)) { - $dest_path = $source_path.'gz'; + $dest_path = $source_path.'.gz'; } $mode = 'wb'.$level; diff --git a/tests/EncodeUtilTest.php b/tests/EncodeUtilTest.php index 30d50f7..0be8093 100644 --- a/tests/EncodeUtilTest.php +++ b/tests/EncodeUtilTest.php @@ -50,7 +50,7 @@ public function test_gzip_file() $dest_path = EncodeUtil::gzipFile($file_path); - $this->assertEquals($dest_path, $file_path.'gz'); + $this->assertEquals($dest_path, $file_path.'.gz'); $this->assertTrue(file_exists($dest_path));