本文整理汇总了PHP中TestCase::init方法的典型用法代码示例。如果您正苦于以下问题:PHP TestCase::init方法的具体用法?PHP TestCase::init怎么用?PHP TestCase::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestCase
的用法示例。
在下文中一共展示了TestCase::init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
function init()
{
parent::init();
$this->api->dbConnect('mysql://root:aa@localhost/atk4core_testsuite');
$this->api->db->beginTransaction();
// force use transaction
}
示例2: init
function init()
{
parent::init();
$this->model = $this->add('Model', array('id_field' => 'id'));
$this->model->addField('id')->type('int');
$this->model->addField('parent_id')->type('flaot');
$this->model->addField('field')->type('str');
$this->rows = array(4 => array('id' => 4, 'parent_id' => 87.40000000000001, 'field' => 'pluto'), 6 => array('id' => 6, 'parent_id' => 826, 'field' => 'pippo'), 9 => array('id' => 9, 'parent_id' => 0.1, 'field' => 'foo'), 10 => array('id' => 10, 'parent_id' => 46.4, 'field' => 'bar'));
$this->controller = $this->add('Controller_Data_Array');
$this->controller->setSource($this->model, $this->rows);
$this->model->setControllerData($this->controller);
}