本文整理汇总了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'));
}
示例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'));
}
示例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');
}
示例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();
}
示例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());
}
示例6: setUp
function setUp()
{
global $DB;
Mock::generate(get_class($DB), 'mockDB');
$this->realDB = $DB;
$DB = new mockDB();
}
示例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'));
}
示例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');
}
示例9: __construct
public function __construct()
{
parent::__construct();
// Make sure the moded db class is available
Mock::generate('MY_DB');
Template::$ignore_session = true;
}
示例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'));
}
示例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);
}
示例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;
}
示例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();
}
示例14: __construct
public function __construct()
{
parent::__construct();
Mock::generate('AkActiveRecord');
Mock::generate('AkActionController');
Mock::generate('AkRequest');
$this->testing_url_path = AK_ASSET_URL_PREFIX;
}
示例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);
}