Beispiel #1
0
 /** @test **/
 public function it_makes_from_headers()
 {
     $headers = ['Content-Type' => 'image/jpeg', 'Content-ID' => '12345678', 'Object-ID' => '1', 'Location' => 'http://blah', 'Content-Description' => 'Main description', 'Content-Sub-Description' => 'Sub description', 'MIME-Version' => 'Mime Version'];
     $o = new Object();
     foreach ($headers as $k => $v) {
         $o->setFromHeader($k, $v);
     }
     $this->assertSame('image/jpeg', $o->getContentType());
     $this->assertSame('12345678', $o->getContentId());
     $this->assertSame('1', $o->getObjectId());
     $this->assertSame('http://blah', $o->getLocation());
     $this->assertSame('Main description', $o->getContentDescription());
     $this->assertSame('Sub description', $o->getContentSubDescription());
     $this->assertSame('Mime Version', $o->getMimeVersion());
 }