writeFile() публичный Метод

Make sure not to output anything else after calling this method.
public writeFile ( $fileName, $content = null, $mimeType = null, $headers = null, $forceDownload = true, $clientFileName = null, $fileSize = null )
Пример #1
0
 public function testWriteFile()
 {
     // Don't know how to test headers :(( ...
     throw new PHPUnit_Framework_IncompleteTestError();
     $response = new THttpResponse();
     $response->setBufferOutput(true);
     // Suppress warning with headers
     $response->writeFile(dirname(__FILE__) . '/data/aTarFile.md5', null, 'text/plain', array('Pragma: public', 'Expires: 0'));
     self::assertContains('4b1ecb0b243918a8bbfbb4515937be98  aTarFile.tar', ob_get_clean());
 }