/**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->controller = $this->login->loadController('Register');
     $this->controller->setProperties(array('activation' => false, 'preHooks' => '', 'postHooks' => '', 'submitVar' => 'unit-test-register-btn', 'submittedResourceId' => 1, 'usergroups' => '', 'validate' => 'nospam:blank'));
     $this->controller->loadDictionary();
 }
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->controller = $this->login->loadController('Register');
     $this->controller->setProperties(array('activation' => false, 'preHooks' => '', 'postHooks' => '', 'submitVar' => 'unit-test-register-btn', 'submittedResourceId' => 1, 'usernameField' => 'email', 'emailField' => 'email', 'validate' => 'nospam:blank'));
     $_POST = array('unit-test-register-btn' => 1, 'email' => '*****@*****.**', 'password' => '123456789', 'nospam' => '');
     $this->controller->loadDictionary();
 }
 public function setUp()
 {
     parent::setUp();
     $this->controller = $this->login->loadController('Register');
     $this->user = $this->modx->newObject('modUser');
     $this->user->fromArray(array('id' => 12345678, 'username' => 'unit.test.user', 'password' => md5('a test password'), 'cachepwd' => '', 'class_key' => 'modUser', 'active' => false, 'hash_class' => 'hashing.modMD5', 'salt' => '', 'primary_group' => 1));
     $_POST = array('username' => 'unit.test.user', 'password' => 'a test password', 'password_confirm' => 'a test password', 'email' => LoginTestHarness::$properties['email'], 'nospam' => '', 'submitVar' => 'unit-test-register-btn');
     $this->controller->setProperties(array('activation' => true, 'activationResourceId' => 1, 'activationEmailSubject' => 'Login Unit Test Activation Email', 'moderatedResourceId' => 1, 'preHooks' => '', 'postHooks' => '', 'submitVar' => 'unit-test-register-btn', 'submittedResourceId' => 1, 'usergroups' => '', 'validate' => 'nospam:blank'));
     $this->controller->loadDictionary();
 }
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->controller = $this->login->loadController('Register');
     $this->controller->setProperties(array('activation' => false, 'preHooks' => '', 'postHooks' => '', 'submitVar' => 'registerbtn', 'activationResourceId' => 1, 'activationEmailTpl' => $this->login->config['testsPath'] . 'Data/Register/5796-activation-email.chunk.tpl', 'activationEmailSubject' => 'Thanks for Registering!', 'submittedResourceId' => 1, 'validate' => 'nospam:blank,
     username:required:minLength=^6^,
     password:required:minLength=^6^,
     password_confirm:password_confirm=^password^,
     fullname:required,
     email:required:email', 'placeholderPrefix' => 'reg.'));
     $_POST = array('username' => 'unit-test-user-5796', 'registerbtn' => 1, 'email' => '', 'password' => '', 'nospam' => '');
     $this->controller->loadDictionary();
 }
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->controller = $this->login->loadController('Register');
     $this->controller->setProperties(array('activation' => false, 'preHooks' => '', 'postHooks' => '', 'submitVar' => 'registerbtn', 'activation' => false));
     $_POST = array('username' => 'unit-test-user-5794', 'registerbtn' => 1, 'email' => LoginTestHarness::$properties['email'], 'password' => '123456789', 'password_confirm' => '123456789', 'nospam' => '');
     $this->controller->loadDictionary();
     $this->controller->process();
     $this->controller = $this->login->loadController('ForgotPassword');
     $this->controller->setProperties(array('preHooks' => '', 'postHooks' => '', 'submitVar' => 'login_fp', 'resetResourceId' => 1));
     $_POST = array('username' => 'unit-test-user-5794', 'email' => '', 'returnUrl' => '', 'login_fp_service' => 'forgotpassword', 'login_fp' => 1, 'nospam' => '');
     $this->controller->loadDictionary();
 }
 public function setUp()
 {
     parent::setUp();
     $this->user = $this->modx->newObject('modUser');
     $this->user->fromArray(array('id' => 12345678, 'username' => 'unit.test.user', 'password' => md5('a test password'), 'cachepwd' => '', 'class_key' => 'modUser', 'active' => false, 'hash_class' => 'hashing.modMD5', 'salt' => '', 'primary_group' => 1, 'email' => LoginTestHarness::$properties['email']));
     $this->profile = $this->modx->newObject('modUserProfile');
     $this->profile->fromArray(array('internalKey' => 12345678, 'email' => LoginTestHarness::$properties['email'], 'blocked' => false));
     /** @var modUserGroup $userGroup */
     $userGroup = $this->modx->newObject('modUserGroup');
     $userGroup->fromArray(array('name' => 'UnitTest UserGroup 1'));
     $userGroup->save();
     $userGroup = $this->modx->newObject('modUserGroup');
     $userGroup->fromArray(array('name' => 'UnitTest UserGroup 2'));
     $userGroup->save();
     $_POST = array('username' => 'unit.test.user', 'password' => 'a test password', 'email' => '*****@*****.**', 'nospam' => '', 'submitVar' => 'unit-test-register-btn');
     $this->controller = $this->login->loadController('Register');
     $this->controller->initialize();
     $this->controller->setProperties(array('activation' => true, 'activationResourceId' => 1, 'activationEmailSubject' => 'Login Unit Test Activation Email', 'moderatedResourceId' => 1, 'preHooks' => '', 'postHooks' => '', 'submitVar' => 'unit-test-register-btn', 'submittedResourceId' => 1, 'usergroups' => '', 'validate' => 'nospam:blank'));
     $this->controller->loadDictionary();
     $this->processor = $this->controller->loadProcessor('Register');
     $this->processor->user =& $this->user;
     $this->processor->profile =& $this->profile;
 }
 public function setUp()
 {
     parent::setUp();
     $this->controller = $this->login->loadController('Profile');
 }