__construct() public method

A simple wrapper to call the parent constructor.
public __construct ( )
Ejemplo n.º 1
0
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->metastrings = array();
     $this->object = new ElggObject();
     $this->object->save();
 }
Ejemplo n.º 2
0
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     $this->ia = elgg_set_ignore_access(TRUE);
     parent::__construct();
     $this->user = new ElggUser();
     $this->user->username = '******' . rand();
     $this->user->email = '*****@*****.**';
     $this->user->name = 'I am a Test User';
     $this->user->access_id = ACCESS_PUBLIC;
     $this->user->salt = generate_random_cleartext_password();
     $this->user->password = generate_user_password($this->user, "pass123");
     $this->user->container_guid = 0;
     $this->user->owner_guid = 0;
     $this->user->save();
     // all __construct() code should come after here
     $this->user2 = new ElggUser();
     // generating API key
     $keypair = create_api_user($CONFIG->site_id);
     if ($keypair) {
         $this->apikey = new ElggObject();
         $this->apikey->subtype = 'api_key';
         $this->apikey->access_id = ACCESS_PUBLIC;
         $this->apikey->title = "User web services";
         $this->apikey->public = $keypair->api_key;
         $this->apikey->save();
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->manifest18 = new ElggPluginManifest(get_config('path') . 'engine/tests/test_files/plugin_18/manifest.xml', 'plugin_test_18');
     $this->manifest17 = new ElggPluginManifest(get_config('path') . 'engine/tests/test_files/plugin_17/manifest.xml', 'plugin_test_17');
     $this->package18 = new ElggPluginPackage(get_config('path') . 'engine/tests/test_files/plugin_18');
     $this->package17 = new ElggPluginPackage(get_config('path') . 'engine/tests/test_files/plugin_17');
 }
Ejemplo n.º 4
0
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->user = new \ElggUser();
     $this->user->username = '******' . rand();
     $this->user->email = '*****@*****.**' . rand();
     $this->user->name = 'fake user ' . rand();
     $this->user->access_id = ACCESS_PUBLIC;
     $this->user->setPassword(rand());
     $this->user->owner_guid = 0;
     $this->user->container_guid = 0;
     $this->user->save();
 }
Ejemplo n.º 5
0
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->user = new ElggUser();
     $this->user->username = '******' . rand();
     $this->user->email = '*****@*****.**' . rand();
     $this->user->name = 'fake user ' . rand();
     $this->user->access_id = ACCESS_PUBLIC;
     $this->user->salt = _elgg_generate_password_salt();
     $this->user->password = generate_user_password($this->user, rand());
     $this->user->owner_guid = 0;
     $this->user->container_guid = 0;
     $this->user->save();
 }
Ejemplo n.º 6
0
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->dbPrefix = elgg_get_config("dbprefix");
     $user = new \ElggUser();
     $user->username = '******' . rand();
     $user->email = '*****@*****.**' . rand();
     $user->name = 'fake user';
     $user->access_id = ACCESS_PUBLIC;
     $user->setPassword(rand());
     $user->owner_guid = 0;
     $user->container_guid = 0;
     $user->save();
     $this->user = $user;
 }
Ejemplo n.º 7
0
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->dbPrefix = get_config("dbprefix");
     $user = new ElggUser();
     $user->username = '******' . rand();
     $user->email = '*****@*****.**' . rand();
     $user->name = 'fake user';
     $user->access_id = ACCESS_PUBLIC;
     $user->salt = generate_random_cleartext_password();
     $user->password = generate_user_password($user, rand());
     $user->owner_guid = 0;
     $user->container_guid = 0;
     $user->save();
     $this->user = $user;
 }
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     elgg_set_ignore_access(true);
     $this->entities = array();
     $this->subtypes = array('object' => array(), 'user' => array(), 'group' => array());
     // sites are a bit wonky.  Don't use them just now.
     $this->types = array('object', 'user', 'group');
     // create some fun objects to play with.
     // 5 with random subtypes
     for ($i = 0; $i < 5; $i++) {
         $subtype = 'test_object_subtype_' . rand();
         $e = new ElggObject();
         $e->subtype = $subtype;
         $e->save();
         $this->entities[] = $e;
         $this->subtypes['object'][] = $subtype;
     }
     // and users
     for ($i = 0; $i < 5; $i++) {
         $subtype = "test_user_subtype_" . rand();
         $e = new ElggUser();
         $e->username = "******" . rand();
         $e->subtype = $subtype;
         $e->save();
         $this->entities[] = $e;
         $this->subtypes['user'][] = $subtype;
     }
     // and groups
     for ($i = 0; $i < 5; $i++) {
         $subtype = "test_group_subtype_" . rand();
         $e = new ElggGroup();
         $e->subtype = $subtype;
         $e->save();
         $this->entities[] = $e;
         $this->subtypes['group'][] = $subtype;
     }
     parent::__construct();
 }
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     $this->ia = elgg_set_ignore_access(true);
     parent::__construct();
     // all __construct() code should come after here
 }
Ejemplo n.º 10
0
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
 }
Ejemplo n.º 11
0
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     // all code should come after here
 }
Ejemplo n.º 12
0
 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->object = new \ElggObject();
     $this->object->save();
 }