<commit_before><?php
/* This class is part of the XP framework
 *
 * $Id$ 
 */
 
  uses(
    'util.profiling.unittest.TestCase'
  );

  /**
   * Test framework code
   *
   * @purpose  Unit Test
   */
  class BaseTest extends TestCase {
      
    /**
     * Test prerequisites
     *
     * @access  public
     */
    #[@test]
    function testPrerequisites() {
      $this->assertEquals(error_reporting(), E_ALL, 'errorreporting');
      $this->assertEquals(get_magic_quotes_gpc(), 0, 'magicquotesgpc');
      $this->assertEquals(get_magic_quotes_runtime(), 0, 'magicquotesruntime');
      $this->assertIn(version_compare(phpversion(), '4.3.0'), array(0, 1), 'phpversion');
    }
    
    /**
     * Test reflection API via lang.XPClass
     *
     * @access  public
     */
    #[@test]
    function testReflection() {
      $class= &XPClass::forName('lang.Exception');
      if (!$this->assertClass($class, 'lang.XPClass')) return;
      $parent= &$class->getParentClass();
      if (!$this->assertClass($parent, 'lang.XPClass')) return;
      $e= &$class->newInstance('test');
      if (!$this->assertClass($e, 'lang.Exception')) return;
      $this->assertEquals($e->message, 'test');
      $o= &$parent->newInstance();
      if (!$this->assertClass($o, 'lang.Throwable')) return;
    }
  }
?><commit_msg>- add test for session.use_trans_sid   use_trans_sid appends the sessionid from PHP's internal session   system to every URL in a webfrontend. As we often use<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$ 
 */
 
  uses(
    'util.profiling.unittest.TestCase'
  );

  /**
   * Test framework code
   *
   * @purpose  Unit Test
   */
  class BaseTest extends TestCase {
      
    /**
     * Test prerequisites
     *
     * @access  public
     */
    #[@test]
    function testPrerequisites() {
      $this->assertEquals(error_reporting(), E_ALL, 'errorreporting');
      $this->assertEquals(get_magic_quotes_gpc(), 0, 'magicquotesgpc');
      $this->assertEquals(get_magic_quotes_runtime(), 0, 'magicquotesruntime');
      $this->assertEquals(intval(ini_get('session.use_trans_sid')), 0, 'trans_sid');
      $this->assertIn(version_compare(phpversion(), '4.3.0', '>='), array(0, 1), 'phpversion');
    }
    
    /**
     * Test reflection API via lang.XPClass
     *
     * @access  public
     */
    #[@test]
    function testReflection() {
      $class= &XPClass::forName('lang.Exception');
      if (!$this->assertClass($class, 'lang.XPClass')) return;
      $parent= &$class->getParentClass();
      if (!$this->assertClass($parent, 'lang.XPClass')) return;
      $e= &$class->newInstance('test');
      if (!$this->assertClass($e, 'lang.Exception')) return;
      $this->assertEquals($e->message, 'test');
      $o= &$parent->newInstance();
      if (!$this->assertClass($o, 'lang.Throwable')) return;
    }
  }
?>
{'fraction_non_alphanumeric': 0.17342657342657342, 'fraction_numerical': 0.005244755244755245, 'mean_word_length': 3.0126227208976157, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '4735631', 'n_tokens_mistral': 958, 'n_tokens_neox': 912, 'n_words': 184}