本文整理汇总了PHP中Doctrine_UnitTestCase::prepareData方法的典型用法代码示例。如果您正苦于以下问题:PHP Doctrine_UnitTestCase::prepareData方法的具体用法?PHP Doctrine_UnitTestCase::prepareData怎么用?PHP Doctrine_UnitTestCase::prepareData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine_UnitTestCase
的用法示例。
在下文中一共展示了Doctrine_UnitTestCase::prepareData方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: prepareData
public function prepareData()
{
parent::prepareData();
$role = new Ticket_1131_Role();
$role->name = 'Role One';
$role->save();
$this->role_one = $role->id;
$role->free();
$role = new Ticket_1131_Role();
$role->name = 'Role Two';
$role->save();
$this->role_two = $role->id;
$role->free();
$group = new Ticket_1131_Group();
$group->role_id = $this->role_one;
$group->name = 'Core Dev';
$group->save();
$user = new Ticket_1131_User();
$user->Group = $group;
$user->role_id = $this->role_two;
$user->name = 'jwage';
$user->save();
$group->free();
$user->free();
}
示例2: prepareData
public function prepareData()
{
$u = new Ticket_DC198_User();
$u->name = 'test';
$u->email->address = 'foo@bar.com';
$u->save();
parent::prepareData();
}
示例3: prepareData
public function prepareData()
{
parent::prepareData();
//we create a test entity that is not a user and not a group
$entity = new Entity();
$entity->name='Other Entity';
$entity->type = 2;
$entity->save();
$this->otherEntity = $entity;
}
示例4: prepareData
public function prepareData()
{
$oPerson = new T929_Person();
$oPerson->name = 'Jonathan';
$oPerson->Country->code = 'us';
$oPerson->Country->Translation['fr']->name = 'Etats Unis';
$oPerson->Country->Translation['en']->name = 'United states';
$oPerson->save();
parent::prepareData();
}
示例5: prepareData
public function prepareData()
{
parent::prepareData();
}