예제 #1
0
 /**
  * @expectedException \Core\ObjectStorage\ObjectStorageException
  */
 public function testPutWhenNotAbleToCreateFolder()
 {
     $data = 'data';
     $storage = new FileStorage('somewhere');
     self::$functions->expects($this->at(0))->method('is_dir')->with($this->equalTo('somewhere'))->will($this->returnValue(false));
     self::$functions->expects($this->at(1))->method('mkdir')->with($this->equalTo('somewhere'))->will($this->returnValue(false));
     $storage->put('mykey', $data);
 }