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


PHP TestHelper::argListToDar方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     $this->non_existent_ugroup_id = 102;
     $this->integrators_ugroup_id = 103;
     $this->project = stub('Project')->getID()->returns(123);
     $dao = mock('UGroupDao');
     $ugroup_definitions = array(array('ugroup_id' => "1", 'name' => "ugroup_anonymous_users_name_key", 'description' => "ugroup_anonymous_users_desc_key", 'group_id' => "100"), array('ugroup_id' => "2", 'name' => "ugroup_registered_users_name_key", 'description' => "ugroup_registered_users_desc_key", 'group_id' => "100"), array('ugroup_id' => "3", 'name' => "ugroup_project_members_name_key", 'description' => "ugroup_project_members_desc_key", 'group_id' => "100"), array('ugroup_id' => "4", 'name' => "ugroup_project_admins_name_key", 'description' => "ugroup_project_admins_desc_key", 'group_id' => "100"), array('ugroup_id' => "11", 'name' => "ugroup_file_manager_admin_name_key", 'description' => "ugroup_file_manager_admin_desc_key", 'group_id' => "100"), array('ugroup_id' => "12", 'name' => "ugroup_document_tech_name_key", 'description' => "ugroup_document_tech_desc_key", 'group_id' => "100"), array('ugroup_id' => "13", 'name' => "ugroup_document_admin_name_key", 'description' => "ugroup_document_admin_desc_key", 'group_id' => "100"), array('ugroup_id' => "14", 'name' => "ugroup_wiki_admin_name_key", 'description' => "ugroup_wiki_admin_desc_key", 'group_id' => "100"), array('ugroup_id' => "15", 'name' => "ugroup_tracker_admins_name_key", 'description' => "ugroup_tracker_admins_desc_key", 'group_id' => "100"), array('ugroup_id' => "100", 'name' => "ugroup_nobody_name_key", 'description' => "ugroup_nobody_desc_key", 'group_id' => "100"), array('ugroup_id' => "103", 'name' => "Integrators", 'description' => "", 'group_id' => "123"), array('ugroup_id' => "103", 'name' => "ugroup_supra_name_key", 'description' => "", 'group_id' => "123"));
     foreach ($ugroup_definitions as $def) {
         stub($dao)->searchByGroupIdAndUGroupId((int) $def['group_id'], (int) $def['ugroup_id'])->returnsDar($def);
         stub($dao)->searchByGroupIdAndName((int) $def['group_id'], $def['name'])->returnsDar($def);
     }
     stub($dao)->searchByGroupIdAndUGroupId()->returnsEmptyDar();
     stub($dao)->searchByGroupIdAndName()->returnsEmptyDar();
     stub($dao)->searchDynamicAndStaticByGroupId(123)->returns(TestHelper::argListToDar($ugroup_definitions));
     $this->ugroup_manager = new UGroupManager($dao);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:16,代码来源:UGroupManagerTest.php

示例2: returnsDar

 /**
  * Ease return of DatabaseAccessResult objects:
  *
  * Example:
  * stub('Dao')->getStuff()->returnsDar(array('id' => '1'), array('id' => '2'));
  *
  * Returns 2 rows out of the database:
  * |Id|
  * |1 |
  * |2 |
  */
 public function returnsDar()
 {
     return $this->returns(TestHelper::argListToDar(func_get_args()));
 }
开发者ID:nterray,项目名称:tuleap,代码行数:15,代码来源:MockBuilder.php

示例3: returnsDarFromArray

 /**
  * Ease return of DatabaseAccessResult objects:
  *
  * Example:
  *  stub('Dao')->getStuff()->returnsDarFromArray(
  *      array(
  *          array('id' => '1'),
  *          array('id' => '2')
  *      )
  *  );
  *
  * Returns 2 rows out of the database:
  * |Id|
  * |1 |
  * |2 |
  */
 public function returnsDarFromArray($array)
 {
     return $this->returns(TestHelper::argListToDar($array));
 }
开发者ID:superlinger,项目名称:tuleap,代码行数:20,代码来源:MockBuilder.php


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