for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use PHPUnit\Framework\TestCase;
use Silviooosilva\CacheerPhp\Cacheer;
use Silviooosilva\CacheerPhp\Config\Option\Builder\OptionBuilder;
final class StaticAccessTest extends TestCase
{
public function testFlushCacheStatic(): void
$result = Cacheer::flushCache();
Silviooosilva\CacheerPhp\Cacheer::flushCache()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
/** @scrutinizer ignore-call */
$this->assertIsBool($result);
}
public function testFlushCacheDynamic(): void
$cache = new Cacheer();
$this->assertIsBool($cache->flushCache());
public function testSetUp(): void
$options = [
'driver' => 'file',
'path' => '/tmp/cache',
];
$cache->setUp($options);
$this->assertSame($options, $cache->options);
public static function testSetUpStatic(): void
Cacheer::setUp($options);
Silviooosilva\CacheerPhp\Cacheer::setUp()
Cacheer::/** @scrutinizer ignore-call */
setUp($options);
self::assertSame($options, Cacheer::getOptions());
Silviooosilva\CacheerPhp\Cacheer::getOptions()
self::assertSame($options, Cacheer::/** @scrutinizer ignore-call */ getOptions());
public function testSetUpStaticWithOptionBuilder(): void
$options = OptionBuilder::forFile()
->dir('/tmp/cache')
->flushAfter()->hour(2)
->build();