public function testSave()
 {
     $a = $this->account;
     // test insert
     $b = $this->mapper->save($a);
     $this->assertNotNull($b);
     $this->assertNotNull($a->getId());
     $this->assertNotNull($b->getId());
     $this->assertEquals($a->getId(), $b->getId());
     // update the entity
     $b->setEmail('*****@*****.**');
     $c = $this->mapper->save($b);
     $this->assertNotNull($c);
     $this->assertNotNull($c->getId());
     $this->assertNotNull($b->getId());
     $this->assertEquals($b->getId(), $c->getId());
 }
Example #2
0
 /**
  * @param $newAccount
  * @return \OCA\Mail\Db\MailAccount
  */
 public function save($newAccount)
 {
     return $this->mapper->save($newAccount);
 }