本文整理汇总了PHP中TestEnv::truncateAllTables方法的典型用法代码示例。如果您正苦于以下问题:PHP TestEnv::truncateAllTables方法的具体用法?PHP TestEnv::truncateAllTables怎么用?PHP TestEnv::truncateAllTables使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestEnv
的用法示例。
在下文中一共展示了TestEnv::truncateAllTables方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetAllAdvertisersForAgency
/**
* A method to test the getAllAdvertisersForAgency() method.
*
* Requirements:
* Test 1: Re-perform Test 5 from above.
*/
function testGetAllAdvertisersForAgency()
{
// Insert a single advertiser
$doClients = OA_Dal::factoryDO('clients');
$doClients->clientname = 'Advertiser 1';
$doClients->agencyid = 1;
$doClients->reportlastdate = '2007-04-03 19:14:59';
$doClients->type = DataObjects_Clients::ADVERTISER_TYPE_DEFAULT;
$aClientId = DataGenerator::generateOne($doClients);
// Test 1
$aClients = $this->dalClients->getAllAdvertisersForAgency(1, 'name', 'up');
$this->assertTrue(is_array($aClients));
$this->assertEqual(count($aClients), 1);
$this->assertTrue(is_array($aClients[1]));
$this->assertEqual(count($aClients[1]), 2);
$this->assertEqual($aClients[1]['clientname'], 'Advertiser 1');
$this->assertEqual($aClients[1]['type'], DataObjects_Clients::ADVERTISER_TYPE_DEFAULT);
TestEnv::truncateAllTables();
}