Example #1
0
 public function testSetMbox()
 {
     $obj = new Agent();
     $obj->setMbox(COMMON_MBOX);
     $this->assertSame(COMMON_MBOX, $obj->getMbox());
     $obj->setMbox(COMMON_EMAIL);
     $this->assertSame(COMMON_MBOX, $obj->getMbox());
     //
     // make sure it doesn't add mailto when null
     //
     $obj->setMbox(null);
     $this->assertAttributeEmpty('mbox', $obj);
 }
Example #2
0
 public function testGetMbox_sha1sum()
 {
     $obj = new Agent(['mbox_sha1sum' => COMMON_MBOX_SHA1]);
     $this->assertSame($obj->getMbox_sha1sum(), COMMON_MBOX_SHA1, 'original sha1');
     $obj = new Agent(['mbox' => COMMON_MBOX]);
     $this->assertSame($obj->getMbox_sha1sum(), COMMON_MBOX_SHA1, 'sha1 from mbox');
 }