Exemplo n.º 1
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testDetachWithMove()
 {
     $user = $this->dm->find($this->type, '/functional/user');
     $user->username = "******";
     $this->dm->detach($user);
     $this->dm->move($user, '/functional/user2');
 }
Exemplo n.º 2
0
 public function testRemoveThenMove()
 {
     $this->dm->clear();
     $user = $this->dm->find($this->type, '/functional/lsmith');
     $this->assertNotNull($user, 'User must exist');
     $this->dm->remove($user);
     $this->dm->move($user, '/functional/user2');
     $this->dm->flush();
     $user = $this->dm->find($this->type, '/functional/user2');
     $this->assertNotNull($user, 'User must exist');
     $user = $this->dm->find($this->type, '/functional/lsmith');
     $this->assertNull($user, 'User must be null after deletion');
 }