for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace spec\Gaufrette\Adapter\Local;
use Gaufrette\Adapter\Local\Local;
use org\bovigo\vfs\vfsStream;
use PhpSpec\ObjectBehavior;
class SafeLocalSpec extends ObjectBehavior
{
function let()
vfsStream::setup('test');
vfsStream::copyFromFileSystem(__DIR__.'/MockFilesystem');
$this->beConstructedWith(vfsStream::url('test'));
}
function it_is_local_adapter()
$this->shouldHaveType(Local::class);
function it_computes_path_using_base64()
rename(vfsStream::url('test/filename'), vfsStream::url('test/'.base64_encode('filename')));
$this->read('filename')->shouldReturn("content\n");
function it_computes_key_back_using_base64()
$this->keys()->shouldReturn(array(base64_decode('dir'), base64_decode('dir/file'), base64_decode('filename')));