当前位置: 首页>>代码示例>>PHP>>正文


PHP ElggCoreUnitTest::__construct方法代码示例

本文整理汇总了PHP中ElggCoreUnitTest::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ElggCoreUnitTest::__construct方法的具体用法?PHP ElggCoreUnitTest::__construct怎么用?PHP ElggCoreUnitTest::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ElggCoreUnitTest的用法示例。


在下文中一共展示了ElggCoreUnitTest::__construct方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->metastrings = array();
     $this->object = new ElggObject();
     $this->object->save();
 }
开发者ID:rasul,项目名称:Elgg,代码行数:10,代码来源:metastrings.php

示例2: __construct

 /**
  * Called before each test object.
  */
 public function __construct()
 {
     $this->ia = elgg_set_ignore_access(TRUE);
     parent::__construct();
     $this->user = new ElggUser();
     $this->user->username = 'test_username_' . rand();
     $this->user->email = 'test@test.org';
     $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();
     }
 }
开发者ID:digecon,项目名称:elgg_web_services,代码行数:30,代码来源:user.php

示例3: __construct

 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');
 }
开发者ID:nooshin-mirzadeh,项目名称:web_2.0_benchmark,代码行数:8,代码来源:ElggCorePluginsAPITest.php

示例4: __construct

 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->user = new \ElggUser();
     $this->user->username = 'fake_user_' . rand();
     $this->user->email = 'fake_email@fake.com' . 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();
 }
开发者ID:gzachos,项目名称:elgg_ellak,代码行数:16,代码来源:ElggCoreAccessSQLTest.php

示例5: __construct

 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->user = new ElggUser();
     $this->user->username = 'fake_user_' . rand();
     $this->user->email = 'fake_email@fake.com' . 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();
 }
开发者ID:gzachos,项目名称:elgg_ellak,代码行数:17,代码来源:ElggCoreAccessSQLTest.php

示例6: __construct

 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->dbPrefix = elgg_get_config("dbprefix");
     $user = new \ElggUser();
     $user->username = 'test_user_' . rand();
     $user->email = 'fake_email@fake.com' . 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;
 }
开发者ID:elgg,项目名称:elgg,代码行数:18,代码来源:ElggCoreAccessCollectionsTest.php

示例7: __construct

 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->dbPrefix = get_config("dbprefix");
     $user = new ElggUser();
     $user->username = 'test_user_' . rand();
     $user->email = 'fake_email@fake.com' . 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;
 }
开发者ID:duanhv,项目名称:mdg-social,代码行数:19,代码来源:access_collections.php

示例8: __construct

 /**
  * 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 = "test_user_" . 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();
 }
开发者ID:nooshin-mirzadeh,项目名称:web_2.0_benchmark,代码行数:41,代码来源:ElggCoreGetEntitiesBaseTest.php

示例9: __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
 }
开发者ID:sephiroth88,项目名称:Elgg,代码行数:9,代码来源:ElggCoreRegressionBugsTest.php

示例10: __construct

 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
 }
开发者ID:thehereward,项目名称:Elgg,代码行数:7,代码来源:ElggCoreHelpersTest.php

示例11: __construct

 /**
  * Called before each test object.
  */
 public function __construct()
 {
     parent::__construct();
     $this->object = new \ElggObject();
     $this->object->save();
 }
开发者ID:elgg,项目名称:elgg,代码行数:9,代码来源:ElggCoreMetastringsTest.php


注:本文中的ElggCoreUnitTest::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。