added text/html to default format mapping

This commit is contained in:
Lukas Kahwe Smith 2011-04-17 14:39:07 +02:00
parent 4c3c6cdabf
commit c2ac8304b0
2 changed files with 2 additions and 1 deletions

View File

@ -974,6 +974,7 @@ class Request
static protected function initializeFormats()
{
static::$formats = array(
'html' => array('text/html', 'application/xhtml+xml'),
'txt' => array('text/plain'),
'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'),
'css' => array('text/css'),

View File

@ -62,7 +62,7 @@ class ResponseListenerTest extends \PHPUnit_Framework_TestCase
$event = new FilterResponseEvent($this->kernel, Request::create('/'), HttpKernelInterface::MASTER_REQUEST, $response);
$this->dispatcher->dispatch(Events::onCoreResponse, $event);
$this->assertEquals('', $event->getResponse()->headers->get('content-type'));
$this->assertEquals('text/html', $event->getResponse()->headers->get('content-type'));
}
public function testFilterSetContentType()