mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-12 15:04:38 +02:00
fix: file cache tweaks (#3470)
* fix: improve file cache * fix(filecache): log when unserialize fails
This commit is contained in:
parent
cc91ee1e37
commit
372880b5ef
3 changed files with 45 additions and 13 deletions
|
@ -6,6 +6,18 @@ use PHPUnit\Framework\TestCase;
|
|||
|
||||
class CacheTest extends TestCase
|
||||
{
|
||||
public function testConfig()
|
||||
{
|
||||
$sut = new \FileCache(['path' => '/tmp/']);
|
||||
$this->assertSame(['path' => '/tmp/', 'enable_purge' => true], $sut->getConfig());
|
||||
|
||||
$sut = new \FileCache(['path' => '/', 'enable_purge' => false]);
|
||||
$this->assertSame(['path' => '/', 'enable_purge' => false], $sut->getConfig());
|
||||
|
||||
$sut = new \FileCache(['path' => '/tmp', 'enable_purge' => true]);
|
||||
$this->assertSame(['path' => '/tmp/', 'enable_purge' => true], $sut->getConfig());
|
||||
}
|
||||
|
||||
public function testFileCache()
|
||||
{
|
||||
$temporaryFolder = sprintf('%s/rss_bridge_%s/', sys_get_temp_dir(), create_random_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue