assertEquals(2, count($split)); $this->assertEquals($boundary, $split['boundary']); } public function testSplitHeaderFieldWithExtraWhitespace() { $boundary = "----=_Alternative_1211565553483705f1280701.15526894A"; $header = "Content-Type: multipart/alternative; " . "boundary = \"$boundary\""; $split = Zend_Mime_Decode::splitHeaderField($header); $this->assertEquals(2, count($split)); $this->assertEquals($boundary, $split['boundary']); } public function testSplitHeaderFieldReturnsOnlyWantedPart() { $boundary = "----=_Alternative_1211565553483705f1280701.15526894A"; $header = "Content-Type: multipart/alternative; " . "boundary=\"$boundary\""; $split = Zend_Mime_Decode::splitHeaderField($header, 'boundary'); $this->assertEquals($boundary, $split); } public function testSplitHeaderFieldReturnsArrayWithFirstName() { $boundary = "----=_Alternative_1211565553483705f1280701.15526894A"; $header = "Content-Type: multipart/alternative; " . "boundary=\"$boundary\""; $split = Zend_Mime_Decode::splitHeaderField($header, null, 'content-type'); $this->assertEquals(2, count($split)); $this->assertTrue(isset($split['content-type']), "'content-type' element is set"); $this->assertEquals($boundary, $split['boundary']); } }