Merge branch '2.3'

* 2.3:
  [HttpFoundation] fixed some unit tests
This commit is contained in:
Fabien Potencier 2013-09-10 23:21:06 +02:00
commit e76cfe27ea
2 changed files with 10 additions and 0 deletions

View File

@ -415,6 +415,10 @@ class Request
$dup->attributes->set('_format', $this->get('_format'));
}
if (!$dup->getRequestFormat(null)) {
$dup->setRequestFormat($format = $this->getRequestFormat(null));
}
return $dup;
}

View File

@ -275,6 +275,12 @@ class RequestTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('json', $dup->getRequestFormat());
$this->assertEquals('json', $dup->attributes->get('_format'));
$request = new Request();
$request->setRequestFormat('xml');
$dup = $request->duplicate();
$this->assertEquals('xml', $dup->getRequestFormat());
}
/**