public function testMovesFileToDesignatedPath()
{
$stream = new Stream('php://temp', 'wb+');
$stream->write('Foo bar!');
$upload = new UploadedFile($stream, 0, UPLOAD_ERR_OK);
$this->tmpFile = $to = tempnam(sys_get_temp_dir(), 'phly');
$upload->moveTo($to);
$this->assertTrue(file_exists($to));
$contents = file_get_contents($to);
$this->assertEquals($stream->__toString(), $contents);
}