aboutsummaryrefslogtreecommitdiff
path: root/tests/UtilsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/UtilsTest.php')
-rw-r--r--tests/UtilsTest.php15
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);
+ }
}