/** * Returns the email id to match against a cid in an email body * @param ImapBodyPart $section * @return string */ private function getCid(ImapBodyPart $section) { return preg_quote(preg_replace(['/^</', '/>$/'], '', $section->getId())); }
/** * @test */ public function it_sets_the_id() { $this->bodyPart->setId('bar'); $this->assertEquals('bar', $this->bodyPart->getId()); }