find() публичный Метод

public find ( $path )
Пример #1
0
 public function testFind()
 {
     $path = 'something.jpg';
     $mimeType = 'foo/mime-type';
     $content = 'some content';
     $binaryFile = new BinaryFile(array('id' => $path, 'mimeType' => $mimeType));
     $this->ioService->expects($this->once())->method('loadBinaryFile')->with($path)->will($this->returnValue($binaryFile));
     $format = 'jpg';
     $this->extensionGuesser->expects($this->once())->method('guess')->with($mimeType)->will($this->returnValue($format));
     $this->ioService->expects($this->once())->method('getFileContents')->with($binaryFile)->will($this->returnValue($content));
     $expected = new Binary($content, $mimeType, $format);
     $this->assertEquals($expected, $this->binaryLoader->find($path));
 }