Esempio n. 1
0
 public function testMoveUploadedFile()
 {
     $storage = new FileStorage('somewhere');
     self::$functions->expects($this->at(0))->method('is_dir')->with($this->equalTo('somewhere'))->will($this->returnValue(true));
     self::$functions->expects($this->at(1))->method('move_uploaded_file')->with($this->equalTo('src_file'), $this->equalTo('somewhere' . DIRECTORY_SEPARATOR . 'mykey'))->will($this->returnValue(true));
     $this->assertTrue($storage->moveUploadedFile('src_file', 'mykey'));
 }