protected function addFile($file, FolderModel $path)
 {
     $filemod = new FileModel($path);
     $filemod->setName($file);
     if (false !== ($size = $this->getManager()->getFileSize($filemod->getFullName()))) {
         $this->filelist[$size][] = $filemod;
         $filemod->setSize($size);
     }
 }
 public function testSimple()
 {
     $FolderModel = $this->getMock('DoublesSearchBundle\\Model\\FolderModel');
     $FolderModel->expects($this->any())->method('getFullPath')->will($this->returnValue('Root/Folder'));
     $f = new FileModel($FolderModel);
     $f->setName('myFile');
     $name = $f->getFullName();
     $this->assertEquals($name, 'Root/Folder/myFile', 'Get Full Name Fail');
 }