This repository has been archived on 2025-05-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
qemudb/unit_test/test_common.php
Chris Morgan b5a41fba77 Add the long awaited 'maintainer notification' system. This system, running from the cron
cleanup scripts, will look for maintainers that have queued entries that the maintainer can
process. If the queued entries aren't processed for X days an email is sent. In X*2 days
another email is sent. After X*3 days the maintainer is stripped of their maintainership as
they aren't really maintaining the application anyway. The hope is that this system lets
maintainers know that they have pending queued entries to process to reduce the pressure on the
appdb admins to handled hundreds of queued entries.
2007-07-20 22:24:37 +00:00

34 lines
801 B
PHP

<?php
/* common functions used in appdb unit tests */
function test_start($sFunctionName)
{
echo $sFunctionName."() starting\n";
}
// create an application and a version of that application
// return the iVersionId of the created version
function create_version_and_parent_app()
{
$oApp = new application();
$oApp->sName = "OM App";
$oApp->create();
$oVersion = new version();
$oVersion->sName = "OM version";
$oVersion->iAppId = $oApp->iAppId;
$oVersion->create();
return $oVersion->iVersionId;
}
// delete a version based on the $iVersionId parameter
// and delete its parent application
function delete_version_and_parent_app($iVersionId)
{
$oVersion = new version($iVersionId);
$oApp = new application($oVersion->iAppId);
$oApp->delete();
}
?>