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


PHP Mock::generate方法代码示例

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


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

示例1: Test_OX_Maintenance_Priority_Campaign

 /**
  * The class constructor method.
  */
 function Test_OX_Maintenance_Priority_Campaign()
 {
     $this->UnitTestCase();
     Mock::generate('MAX_Dal_Entities');
     Mock::generate('OA_Dal_Maintenance_Priority');
     Mock::generatePartial('OX_Maintenance_Priority_Campaign', 'MockPartialOX_Maintenance_Priority_Campaign', array('_abort'));
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:10,代码来源:Campaign.mtp.test.php

示例2: __construct

 /**
  * The class constructor method.
  */
 function __construct()
 {
     parent::__construct();
     Mock::generate('MAX_Dal_Entities');
     Mock::generate('OA_Dal_Maintenance_Priority');
     Mock::generatePartial('OX_Maintenance_Priority_Campaign', 'MockPartialOX_Maintenance_Priority_Campaign', array('_abort'));
 }
开发者ID:esclapes,项目名称:revive-adserver,代码行数:10,代码来源:Campaign.mtp.test.php

示例3: __construct

 /**
  * The constructor method.
  */
 function __construct()
 {
     parent::__construct();
     Mock::generate('MAX_Dal_Entities');
     Mock::generate('OA_Dal_Maintenance_Priority');
     Mock::generate('OA_DB_Table_Priority');
 }
开发者ID:Jaree,项目名称:revive-adserver,代码行数:10,代码来源:AllocateZoneImpressions.mtp.test.php

示例4: setUp

 /**
  * Constructor.
  *
  * @access  public
  * @return  void
  */
 public function setUp()
 {
     parent::setUp();
     Mock::generate('Crumbly_model', get_class($this) . '_mock_model');
     $this->_model = $this->_get_mock('model');
     $this->_subject = new Crumbly_upd();
 }
开发者ID:realfluid,项目名称:umbaugh,代码行数:13,代码来源:test.upd_crumbly.php

示例5: __construct

 /**
  * The constructor method.
  */
 function __construct()
 {
     parent::__construct();
     Mock::generate('OA_Dal_Maintenance_Priority', $this->mockDal = 'MockOA_Dal_Maintenance_Priority' . rand());
     Mock::generatePartial('OA_Maintenance_Priority_AdServer_Task_PriorityCompensation', 'PartialMock_OA_Maintenance_Priority_AdServer_Task_PriorityCompensation', array('_getDal', '_getOperationIntUtils', '_getMaxEntityAdObject'));
     Mock::generatePartial('OA_Maintenance_Priority_Ad', 'PartialOA_Maintenance_Priority_Ad', array());
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:10,代码来源:PriorityCompensation.mtp.test.php

示例6: setUp

 function setUp()
 {
     global $DB;
     Mock::generate(get_class($DB), 'mockDB');
     $this->realDB = $DB;
     $DB = new mockDB();
 }
开发者ID:nutanrajmalanai,项目名称:moodle,代码行数:7,代码来源:testcourselib.php

示例7: Test_OA_Maintenance_Priority_AdServer_Task_ECPMforRemnant

 /**
  * The constructor method.
  */
 function Test_OA_Maintenance_Priority_AdServer_Task_ECPMforRemnant()
 {
     $this->UnitTestCase();
     Mock::generate('OA_Dal_Maintenance_Priority', $this->mockDal = 'MockOA_Dal_Maintenance_Priority' . rand());
     Mock::generate('MAX_Dal_Admin_Data_intermediate_ad', $this->mockDalIntermediateAd = 'MAX_Dal_Admin_Data_intermediate_ad' . rand());
     Mock::generatePartial('OA_Maintenance_Priority_AdServer_Task_ECPMforRemnant', 'PartialMock_OA_Maintenance_Priority_AdServer_Task_ECPMforRemnant', array('_getDal', '_factoryDal', 'getTodaysRemainingOperationIntervals', 'calculateCampaignEcpm'));
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:10,代码来源:ECPMforRemnant.mtp.test.php

示例8: Test_OA_Maintenance_Priority_AdServer_Task_AllocateZoneImpressions

 /**
  * The constructor method.
  */
 function Test_OA_Maintenance_Priority_AdServer_Task_AllocateZoneImpressions()
 {
     $this->UnitTestCase();
     Mock::generate('MAX_Dal_Entities');
     Mock::generate('OA_Dal_Maintenance_Priority');
     Mock::generate('OA_DB_Table_Priority');
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:10,代码来源:AllocateZoneImpressions.mtp.test.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     // Make sure the moded db class is available
     Mock::generate('MY_DB');
     Template::$ignore_session = true;
 }
开发者ID:ivantcholakov,项目名称:Bonfire,代码行数:7,代码来源:activity_model_test.php

示例10: Test_OA_DB_Table

 /**
  * The constructor method.
  */
 function Test_OA_DB_Table()
 {
     $this->UnitTestCase();
     // Mock the OA_DB class
     Mock::generate('OA_DB');
     // Partially mock the OA_DB_Table class
     Mock::generatePartial('OA_DB_Table', 'PartialMockOA_DB_Table', array('_getDbConnection'));
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:11,代码来源:Table.tbl.test.php

示例11: setUp

 /**
  * Constructor.
  *
  * @access  public
  * @return  void
  */
 public function setUp()
 {
     parent::setUp();
     Mock::generate('Omnilog_model', get_class($this) . '_mock_model');
     $this->EE->omnilog_model = $this->_get_mock('model');
     $this->_model = $this->EE->omnilog_model;
     $this->_log_entry_props = array('addon_name' => 'Example Add-on', 'date' => time() - 100, 'message' => 'Example log entry.', 'extended_data' => 'Example OmniLog extended data.', 'notify_admin' => FALSE, 'type' => Omnilog_entry::NOTICE);
 }
开发者ID:notacouch,项目名称:omnilog.ee_addon,代码行数:14,代码来源:test.omnilogger.php

示例12: setUp

 public function setUp()
 {
     Mock::generate('\\Pheanstalk\\Socket\\StreamFunctions', 'MockStreamFunctions');
     $instance = new MockStreamFunctions();
     $instance->setReturnValue('fsockopen', true);
     \Pheanstalk\Socket\StreamFunctions::setInstance($instance);
     $this->_streamFunctions = $instance;
 }
开发者ID:roverwolf,项目名称:pheanstalk,代码行数:8,代码来源:NativeSocketTest.php

示例13: setUp

 /**
  * Constructor.
  *
  * @access  public
  * @return  void
  */
 public function setUp()
 {
     parent::setUp();
     Mock::generate('Omnilog_model', get_class($this) . '_mock_model');
     $this->EE->omnilog_model = $this->_get_mock('model');
     $this->_model = $this->EE->omnilog_model;
     $this->_subject = new Omnilog_mcp();
 }
开发者ID:notacouch,项目名称:omnilog.ee_addon,代码行数:14,代码来源:test.mcp_omnilog.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     Mock::generate('AkActiveRecord');
     Mock::generate('AkActionController');
     Mock::generate('AkRequest');
     $this->testing_url_path = AK_ASSET_URL_PREFIX;
 }
开发者ID:bermi,项目名称:akelos,代码行数:8,代码来源:helpers.php

示例15: generate_mock_once

function generate_mock_once($name)
{
    $mock_name = $name . 'Mock';
    if (class_exists($mock_name, false)) {
        return false;
    }
    Mock::generate($name, $mock_name);
}
开发者ID:artbypravesh,项目名称:morningpages,代码行数:8,代码来源:generate_mock_once.func.php


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