コード例 #1
0
 public function tearDown()
 {
     parent::tearDown();
     /**
      * @var $user \Application\Model\UserModel
      */
     $user = $this->_userMapper->findOneById($this->_itemId);
     if ($user->status === \Application\Model\UserModel::USER_STATUS_DEACTIVATED) {
         $user->status = \Application\Model\UserModel::USER_STATUS_ACTIVATED;
         $user->save();
     }
 }
コード例 #2
0
 public function testDeleteExistingUser()
 {
     // Persist the user
     $this->user->save();
     $this->userMapper->delete($this->user->getId());
     //try to retrieve same user
     $user = $this->userMapper->findOneById($this->user->getId());
     $this->assertNull($user);
 }