Merge branch '2.2' into 2.3
* 2.2: [HttpFoundation] fixed some unit tests
This commit is contained in:
commit
5ca19ee433
@ -408,6 +408,10 @@ class Request
|
|||||||
$dup->attributes->set('_format', $this->get('_format'));
|
$dup->attributes->set('_format', $this->get('_format'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$dup->getRequestFormat(null)) {
|
||||||
|
$dup->setRequestFormat($format = $this->getRequestFormat(null));
|
||||||
|
}
|
||||||
|
|
||||||
return $dup;
|
return $dup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,6 +275,12 @@ class RequestTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$this->assertEquals('json', $dup->getRequestFormat());
|
$this->assertEquals('json', $dup->getRequestFormat());
|
||||||
$this->assertEquals('json', $dup->attributes->get('_format'));
|
$this->assertEquals('json', $dup->attributes->get('_format'));
|
||||||
|
|
||||||
|
$request = new Request();
|
||||||
|
$request->setRequestFormat('xml');
|
||||||
|
$dup = $request->duplicate();
|
||||||
|
|
||||||
|
$this->assertEquals('xml', $dup->getRequestFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user