Exemplo n.º 1
0
    public function testContentTypeGetFieldValueReturnsProperValue()
    {
        $this->markTestIncomplete('ContentType needs to be completed');

        $contentTypeHeader = new ContentType();
        $this->assertEquals('xxx', $contentTypeHeader->getFieldValue());
    }
 /**
  * @param  ContentTypeHeader $contentType
  * @param  HttpRequest $request
  * @throws Exception\InvalidMultipartContentException if unable to detect MIME boundary
  */
 public function __construct(ContentTypeHeader $contentType, HttpRequest $request)
 {
     if (!preg_match('/boundary=(?P<boundary>[^\\s]+)/', $contentType->getFieldValue(), $matches)) {
         throw new Exception\InvalidMultipartContentException();
     }
     $this->boundary = $matches['boundary'];
     $this->request = $request;
 }