Ejemplo n.º 1
0
 /**
  * @test
  * @dataProvider provideFiles
  */
 public function getMimeTypeReturnsMimeType($expected, $filename)
 {
     $this->plugin->attachTo($this->filelib);
     $resource = Resource::create();
     $file = File::create(array('resource' => $resource));
     $this->plugin->expects($this->atLeastOnce())->method('areSharedVersionsAllowed')->will($this->returnValue(true));
     $this->storage->expects($this->once())->method('retrieveVersion')->with($resource, Version::get('xoox'))->will($this->returnValue($filename));
     $mimeType = $this->plugin->getMimeType($file, Version::get('xoox'));
     $this->assertSame($expected, $mimeType);
 }