diff options
author | 2022-08-06 22:46:28 +0200 | |
---|---|---|
committer | 2022-08-06 22:46:28 +0200 | |
commit | 2bbce8ebef8cf4f88392431aabe84a15482dc933 (patch) | |
tree | 1f5027ca69b1dfa2364bd9319e8536b86a41e928 /tests | |
parent | b042412416cc4ecc71c3f9c13239661a0dd588a6 (diff) | |
download | rss-bridge-2bbce8ebef8cf4f88392431aabe84a15482dc933.tar.gz rss-bridge-2bbce8ebef8cf4f88392431aabe84a15482dc933.tar.zst rss-bridge-2bbce8ebef8cf4f88392431aabe84a15482dc933.zip |
refactor: general code base refactor (#2950)
* refactor
* fix: bug in previous refactor
* chore: exclude phpcompat sniff due to bug in phpcompat
* fix: do not leak absolute paths
* refactor/fix: batch extensions checking, fix DOS issue
Diffstat (limited to 'tests')
-rw-r--r-- | tests/UtilsTest.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php index 996886a7..3dd389c6 100644 --- a/tests/UtilsTest.php +++ b/tests/UtilsTest.php @@ -16,4 +16,19 @@ final class UtilsTest extends TestCase $this->assertSame('foo', truncate('foo', 4)); $this->assertSame('fo[...]', truncate('foo', 2, '[...]')); } + + public function testFileCache() + { + $sut = new \FileCache(); + $sut->setScope('scope'); + $sut->purgeCache(-1); + $sut->setKey(['key']); + + $this->assertNull($sut->loadData()); + + $sut->saveData('data'); + $this->assertSame('data', $sut->loadData()); + $this->assertIsNumeric($sut->getTime()); + $sut->purgeCache(-1); + } } |