for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace StorageTests;
use kalanis\kw_cache\CacheException;
use kalanis\kw_cache\Storage;
class BasicTest extends AStorageTest
{
/**
* @throws CacheException
*/
public function testRun(): void
$lib = new Storage\Basic($this->getStorage(new \MockStorage()));
$lib->init('');
$this->assertFalse($lib->exists());
$this->assertEquals('', $lib->get());
$this->assertTrue($lib->set(static::TESTING_CONTENT));
$this->assertTrue($lib->exists());
$this->assertEquals(static::TESTING_CONTENT, $lib->get());
$lib->clear();
}
public function testNotExists(): void
$lib = new Storage\Basic($this->getStorage(new \MockKillingStorage3()));
$this->expectException(CacheException::class);
$lib->exists();
public function testNotSet(): void
$lib = new Storage\Basic($this->getStorage(new \MockKillingStorage2()));
$lib->set('lkjhgfdsa');
public function testNotGet(): void
$lib->get();
public function testNotClear(): void