<commit_before><?php
require 'vendor/autoload.php';
require './import/iVariation.inc.php';
require './import/VariationMain.inc.php';
require_once 'config.inc.php';

use \actimeo\pgproc\PgProcedures;
use \actimeo\pgproc\PgProcException;

class EventsTest extends PHPUnit_Framework_TestCase {
  private static $base;
  private static $pgHost;
  private static $pgUser;
  private static $pgPass;
  private static $pgPort;
  private static $pgDatabase;
  
  public static function setUpBeforeClass() {
    
    // Get connection params
    global $pg_host, $pg_user, $pg_pass, $pg_database, $pg_port;
    self::$pgHost = $pg_host;
    self::$pgUser = $pg_user;
    self::$pgPass = $<PASSWORD>;
    self::$pgPort = $pg_port;
    self::$pgDatabase = $pg_database;
    self::assertNotNull(self::$pgHost);
    self::assertNotNull(self::$pgUser);
    self::assertNotNull(self::$pgPass);
    self::assertNotNull(self::$pgDatabase);
    
    // Create object
    self::$base = new PgProcedures (self::$pgHost, self::$pgUser, self::$pgPass, self::$pgDatabase,
				    self::$pgPort, '.traces');
    self::assertNotNull(self::$base);    

    $main = new VariationMain('./arrangement-test', self::$base);
    $main->collectObjects('import/objects/', [ '', 'data/' ]);
    $main->start();
    $main->callObjects();
    //$main->end(); DO NOT CALL so ROLLBACK is DONE
  }
  
  protected function assertPreConditions()
  {
    self::$base->startTransaction();
  }

  protected function assertPostConditions()
  {
    self::$base->rollback();
  }
  
}
?><commit_msg>(tests) make tests pass<commit_after><?php
require 'vendor/autoload.php';
require './import/iVariation.inc.php';
require './import/VariationMain.inc.php';
require_once 'config.inc.php';

use \actimeo\pgproc\PgProcedures;
use \actimeo\pgproc\PgProcException;

class EventsTest extends PHPUnit_Framework_TestCase {
  private static $base;
  private static $pgHost;
  private static $pgUser;
  private static $pgPass;
  private static $pgPort;
  private static $pgDatabase;
  
  public static function setUpBeforeClass() {
    
    // Get connection params
    global $pg_host, $pg_user, $pg_pass, $pg_database, $pg_port;
    self::$pgHost = $pg_host;
    self::$pgUser = $pg_user;
    self::$pgPass = $<PASSWORD>;
    self::$pgPort = $pg_port;
    self::$pgDatabase = $pg_database;
    self::assertNotNull(self::$pgHost);
    self::assertNotNull(self::$pgUser);
    self::assertNotNull(self::$pgPass);
    self::assertNotNull(self::$pgDatabase);
    
    // Create object
    self::$base = new PgProcedures (self::$pgHost, self::$pgUser, self::$pgPass, self::$pgDatabase,
				    self::$pgPort, '.traces');
    self::assertNotNull(self::$base);    

    $main = new VariationMain('./arrangement-test', self::$base);
    $main->collectObjects('import/objects/', [ '', 'data/' ]);
    $main->start();
    $main->callObjects();
    //$main->end(); DO NOT CALL so ROLLBACK is DONE
  }
  
  protected function assertPreConditions()
  {
    self::$base->startTransaction();
  }

  protected function assertPostConditions()
  {
    self::$base->rollback();
  }

  public function testOk() {
    $this->assertTrue(true);
  }
  
}
?>
{'fraction_non_alphanumeric': 0.16272469252601704, 'fraction_numerical': 0.0, 'mean_word_length': 4.050955414012739, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 20, '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': '4520262', 'n_tokens_mistral': 1044, 'n_tokens_neox': 1065, 'n_words': 203}