private function checkContentDispositionFilename(HeadersSet $headersSet, $filename) { $this->assertTrue($headersSet->hasHeaders("Content-Disposition")); $headers = $headersSet->getHeaders("Content-Disposition"); $this->assertInternalType('array', $headers); $this->assertContains($filename, $headers[0]); }
/** * Retrieves a comma-separated string of the values for a single header. * * This method returns all of the header values of the given * case-insensitive header name as a string concatenated together using * a comma. * * NOTE: Not all header values may be appropriately represented using * comma concatenation. For such headers, use getHeader() instead * and supply your own delimiter when concatenating. * * If the header does not appear in the message, this method MUST return * an empty string. * * @param string $name Case-insensitive header field name. * @return string A string of values as provided for the given header * concatenated together using a comma. If the header does not appear in * the message, this method MUST return an empty string. */ public function getHeaderLine($name) { if ($this->headersSet->hasHeaders($name) === false) { return ''; } $values = $this->getHeader($name); return implode(',', $values); }