Remove DeliverDataInterface::deliverData as never used

This commit is contained in:
Benoît Burnichon
2016-01-29 17:43:41 +01:00
parent 6fa37f3aee
commit ced5094355
4 changed files with 0 additions and 60 deletions

View File

@@ -139,21 +139,4 @@ class ServeFileResponseFactoryTest extends \PhraseanetWebTestCase
$this->assertEquals('attachment; filename="PhraseanetTestCase.php"', $response->headers->get('content-disposition'));
$this->assertEquals(realpath($file), $response->headers->get('x-accel-redirect'));
}
public function testDeliverDatas()
{
$this->factory = new ServeFileResponseFactory(new \unicode());
$data = 'Sex,Name,Birthday
M,Alphonse,1932
F,Béatrice,1964
F,Charlotte,1988';
$response = $this->factory->deliverData($data, 'data.csv', 'text/csv', 'attachment');
$this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $response);
$this->assertEquals('attachment; filename="data.csv"', $response->headers->get('content-disposition'));
$this->assertEquals('text/csv', $response->headers->get('content-type'));
$this->assertEquals($data, $response->getContent());
}
}