<commit_before><?php
// kwtest library
require_once('kwtest/kw_web_tester.php');
require_once('kwtest/kw_db.php');

class InstallTestCase extends KWWebTestCase
{
  var $url           = null;
  var $db            = null;
  var $projecttestid = null;
  
  function __construct()
    {
    parent::__construct();
    require('config.test.php');
    $this->url = $configure['urlwebsite'];
    $this->db  =& new database($db['type']);
    $this->databaseName = $db['name'];
    $this->db->setDb($this->databaseName);
    $this->db->setHost($db['host']);
    $this->db->setUser($db['login']);
    $this->db->setPassword($db['<PASSWORD>']);
    $this->projectid = -1;
    }

  function testInstall()
    {
    //double check that it's the testing database before doing anything hasty...
    if($this->databaseName !== "cdash4simpletest")
      {
      $this->fail("can only test on a database named 'cdash4simpletest'");
      return 1;
      }

    //drop any old testing database before testing install
    if(!$this->db->drop($this->databaseName))
      {
      $this->fail("Failed to drop the database!");
      return 1;
      }

    // Create the database  
    if($db['type'] == 'pgsql')<commit_msg>BUG: PostgreSQL should have a database created<commit_after><?php
// kwtest library
require_once('kwtest/kw_web_tester.php');
require_once('kwtest/kw_db.php');

class InstallTestCase extends KWWebTestCase
{
  var $url           = null;
  var $db            = null;
  var $projecttestid = null;
  
  function __construct()
    {
    parent::__construct();
    require('config.test.php');
    $this->url = $configure['urlwebsite'];
    $this->db  =& new database($db['type']);
    $this->databaseName = $db['name'];
    $this->db->setDb($this->databaseName);
    $this->db->setHost($db['host']);
    $this->db->setUser($db['login']);
    $this->db->setPassword($db['<PASSWORD>']);
    $this->projectid = -1;
    }

  function testInstall()
    {
    //double check that it's the testing database before doing anything hasty...
    if($this->databaseName !== "cdash4simpletest")
      {
      $this->fail("can only test on a database named 'cdash4simpletest'");
      return 1;
      }

    //drop any old testing database before testing install
    $this->db->drop($this->databaseName);
    
    // Create the database  
    if($this->db->type == 'pgsql')
{'fraction_non_alphanumeric': 0.17304421768707484, 'fraction_numerical': 0.003826530612244898, 'mean_word_length': 3.0499139414802063, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2850526', 'n_tokens_mistral': 751, 'n_tokens_neox': 738, 'n_words': 160}