本文整理匯總了PHP中SimpleTest::getMockBaseClass方法的典型用法代碼示例。如果您正苦於以下問題:PHP SimpleTest::getMockBaseClass方法的具體用法?PHP SimpleTest::getMockBaseClass怎麽用?PHP SimpleTest::getMockBaseClass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SimpleTest
的用法示例。
在下文中一共展示了SimpleTest::getMockBaseClass方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Builds initial reflection object.
* @param string $class Class to be mocked.
* @param string $mock_class New class with identical interface,
* but no behaviour.
*/
function __construct($class, $mock_class)
{
$this->class = $class;
$this->mock_class = $mock_class;
if (!$this->mock_class) {
$this->mock_class = 'Mock' . $this->class;
}
$this->mock_base = SimpleTest::getMockBaseClass();
$this->reflection = new SimpleReflection($this->class);
}
示例2: MockGenerator
function MockGenerator($class, $mock_class)
{
$this->_class = $class;
$this->_mock_class = $mock_class;
$this->_mock_base = SimpleTest::getMockBaseClass();
$this->_reflection = new SimpleReflection($this->_class);
}
示例3: __construct
function __construct($class, $mock_class)
{
$this->_class = $class;
$this->_mock_class = $mock_class;
$this->_mock_base = SimpleTest::getMockBaseClass();
$this->_reflection = new SimpleReflection($this->_class);
}