本文整理匯總了PHP中ControllerTestCase::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP ControllerTestCase::__construct方法的具體用法?PHP ControllerTestCase::__construct怎麽用?PHP ControllerTestCase::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ControllerTestCase
的用法示例。
在下文中一共展示了ControllerTestCase::__construct方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* If a class is extending AppTestCase it will merge these with the extending classes
* so that you don't have to put the plugin fixtures into the AppTestCase
*
* @return void
*/
public function __construct($name = NULL, array $data = array(), $dataName = '')
{
parent::__construct($name, $data, $dataName);
if (is_subclass_of($this, 'AppTestCase')) {
$parentClass = get_parent_class($this);
$parentVars = get_class_vars($parentClass);
if (isset($parentVars['fixtures'])) {
$this->fixtures = array_unique(array_merge($parentVars['fixtures'], $this->fixtures));
}
if (!empty($this->plugin)) {
$this->dependedFixtures = $this->solveDependancies($this->plugin);
}
if (!empty($this->dependedFixtures)) {
foreach ($this->dependedFixtures as $plugin) {
$fixtures = $this->loadConfig('fixtures', $plugin);
if (!empty($fixtures)) {
$this->fixtures = array_unique(array_merge($this->fixtures, $fixtures));
}
}
}
}
}