<h1>Test version class</h1>
go to <a href="test-getter.php">test-getter.php</a>

<h2>Creating a few test data</h2>

<?php
// echo 'GET: <pre>'.print_r($_GET, 1).'</pre><hr>';

require '../classes/valuestore.class.php';



function insert($sPackage, $sPhase){

    $oVersion=new valuestore();
    
    $sVersion=rand(10000, 99999);
    $svalue='{ "revision": "'.$sVersion.'" }';
    
    
    $oVersion->setProject("", $sPackage, $sPhase, 'onhold', '');
    print_r($oVersion->whereiam());
    if (!$oVersion->updateVersion($svalue)){
        die("failed ");
    }

    $oVersion->setProject("", $sPackage, $sPhase, 'ready2install', '');
    $oVersion->updateVersion($svalue);

    $sHost=$sPhase.'01.'.$sPackage;
    $oVersion->setProject("", $sPackage, $sPhase, 'deployed', $sHost);
    $oVersion->updateVersion($svalue);

    $sHost=$sPhase.'02.'.$sPackage;
    $oVersion->setProject("", $sPackage, $sPhase, 'deployed', $sHost);
    $oVersion->updateVersion($svalue);
    
}

insert('player', 'stage');
insert('player', 'live');

insert('ci', 'preview');
insert('ci', 'stage');
insert('ci', 'live');

$oVersion=new valuestore();
echo '<pre>'.print_r($oVersion->dumpdb(), 1) . '</pre>';
// $oVersion->