$app = substr($apps_dir[0], strrpos($apps_dir[0], DIRECTORY_SEPARATOR) + 1, strlen($apps_dir[0]));
if (!$app) {
    throw new Exception('No app has been detected in this project');
}
require_once $sf_root_dir . '/test/bootstrap/functional.php';
require_once $sf_symfony_lib_dir . '/vendor/lime/lime.php';
if (!defined('TEST_CLASS') || !class_exists(TEST_CLASS)) {
    // Don't run tests
    return;
}
// initialize database manager
$databaseManager = new sfDatabaseManager();
$databaseManager->initialize();
$con = Propel::getConnection();
// clean the database
sfCounterPeer::doDeleteAll();
call_user_func(array(_create_object()->getPeer(), 'doDeleteAll'));
// create a new test browser
$browser = new sfTestBrowser();
$browser->initialize();
// start tests
$t = new lime_test(8, new lime_output_color());
// these tests check for the counter consistency
$t->diag('counter consistency');
$object = _create_object();
$object->save();
$t->ok($object->getCounter() == 0, 'a new object has a null counter.');
$object->incrementCounter();
$t->ok($object->getCounter() == 1, 'after one increment, the counters value is 1.');
$rand = rand(1, 100);
$i = 0;