本文整理汇总了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));
}
}
}
}
}