mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-21 09:48:33 +02:00
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
This commit is contained in:
parent
b042412416
commit
2bbce8ebef
45 changed files with 679 additions and 827 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue