public function testErrorHasBeenMovedGetStream() { $uploadedFile = new UploadedFile($this->uploadFile, 10, 0, 'some.txt', 'text/plain'); $newFilename = uniqid('tlumxframework_http_upload_file-'); $path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $newFilename; $uploadedFile->moveTo($path); $this->assertFileExists($path); unlink($path); $this->setExpectedException('RuntimeException', 'Cannot retrieve stream: "Uploaded file has already been moved"'); $uploadedFile->getStream(); }