Esempio n. 1
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testReplaceItemException()
 {
     $this->storage->expects($this->once())->method('getMimeType')->with('key')->will($this->returnValue('text/html'));
     $file = $this->getMockBuilder('Zend_Form_Element_File')->disableOriginalConstructor()->getMock();
     $file->expects($this->once())->method('getMimeType')->will($this->returnValue('binary/jpeg'));
     $this->service->replaceItem('key', $file);
 }
Esempio n. 2
0
 /**
  * Get metadata
  *
  * @return object
  */
 private function getMetadata()
 {
     if (empty($this->metadata)) {
         $this->metadata = $this->storage->fetchMetadata($this->key);
     }
     return (object) $this->metadata;
 }
Esempio n. 3
0
 public function testGetRealpath()
 {
     $this->assertEquals(realpath("{$this->root}/dir"), $this->storage->getRealpath('dir'));
 }