本文整理匯總了PHP中PhraseanetTestCase::recordsInitialized方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhraseanetTestCase::recordsInitialized方法的具體用法?PHP PhraseanetTestCase::recordsInitialized怎麽用?PHP PhraseanetTestCase::recordsInitialized使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PhraseanetTestCase
的用法示例。
在下文中一共展示了PhraseanetTestCase::recordsInitialized方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: deleteResources
/**
* Deletes previously created Resources.
*/
private static function deleteResources()
{
if (self::$recordsInitialized !== false) {
foreach (self::$recordsInitialized as $i) {
self::$DI['record_' . $i]->delete();
}
self::$recordsInitialized = [];
}
$duration = PhraseanetPHPUnitListener::getDurationByTest();
$tests = [];
foreach ($duration as $name => $data) {
$tests[$name . '(total : ' . $data['time'] . ' and ' . $data['executions'] . ' executions)'] = $data['time'] / $data['executions'];
}
asort($tests);
$csvData = PhraseanetPHPUnitListener::getCsv();
if (count($csvData) > 0) {
foreach ($csvData as $data) {
file_put_contents(__DIR__ . '/../../report.csv', "\"" . implode('","', array_map(function ($value) {
return str_replace('"', '""', $value);
}, $data)) . "\"\n", FILE_APPEND);
}
}
PhraseanetPHPUnitListener::resetDuration();
return;
}
示例2: deleteResources
/**
* Deletes previously created Resources.
*/
private static function deleteResources()
{
if (!empty(self::$recordsInitialized)) {
foreach (self::$recordsInitialized as $i) {
self::$DI['record_' . $i]->delete();
}
self::$recordsInitialized = [];
}
// Clear fixtures
self::$fixtureIds = [];
}