/**
  * @test
  */
 public function createsTemporaryVersions()
 {
     $plugin = new ArbitraryVersionPlugin('arbitrary', function () {
         return array('xoo');
     }, function () {
         return array();
     }, function () {
         return array('xoo' => 'xuu');
     }, function () {
         return true;
     }, function () {
         return array();
     }, function () {
         return 'image/jpeg';
     });
     $resource = Resource::create(array('mimetype' => 'image/jpeg'));
     $file = File::create(array('resource' => $resource));
     $storage = $this->getMockedStorage();
     $storage->expects($this->atLeastOnce())->method('retrieve')->with($resource)->will($this->returnValue(ROOT_TESTS . '/data/self-lussing-manatee.jpg'));
     $filelib = $this->getMockedFilelib(null, array('tempDir' => ROOT_TESTS . '/data/temp', 'storage' => $storage));
     $plugin->attachTo($filelib);
     $ret = $plugin->createAllTemporaryVersions($file);
     $this->assertCount(1, $ret);
     $this->assertArrayHasKey('arbitrary::xoo:xuu', $ret);
     $this->assertStringStartsWith(ROOT_TESTS . '/data/temp', array_pop($ret));
 }