本文整理汇总了PHP中Admin_DA::duplicatePlacement方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin_DA::duplicatePlacement方法的具体用法?PHP Admin_DA::duplicatePlacement怎么用?PHP Admin_DA::duplicatePlacement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin_DA
的用法示例。
在下文中一共展示了Admin_DA::duplicatePlacement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testDuplicatePlacement
function testDuplicatePlacement()
{
TestEnv::startTransaction();
$placementId = Admin_DA::addPlacement(array('campaignname' => 'foo', 'clientid' => 0, 'views' => rand(1, 9999), 'clicks' => rand(1, 9999), 'conversions' => rand(1, 9999), 'activate_time' => '2007-03-29 00:00:00', 'expire_time' => '2007-04-10 23:59:59'));
$this->assertTrue(is_int($placementId));
$this->assertTrue($placementId > 0);
$placement1 = Admin_DA::getPlacement($placementId);
$ret = Admin_DA::duplicatePlacement($placementId);
$this->assertTrue(is_int($ret));
$this->assertTrue($ret > 0);
$placement2 = Admin_DA::getPlacement($ret);
$this->assertTrue(is_array($placement2));
$this->assertTrue(count($placement2));
// compare two placements
unset($placement1['placement_id']);
unset($placement2['placement_id']);
unset($placement1['name']);
unset($placement2['name']);
$this->assertEqual($placement1, $placement2);
TestEnv::rollbackTransaction();
}