<commit_before><?php

require dirname(__file__) . '/../classes/BaseHttpResponse.php';

class BaseHttpResponseTest extends PHPUnit_Framework_TestCase {
  
  public function testGetNotSet() {
    $response = new BaseHttpResponse();
    $this->assertEquals(NULL, $response->get('thiskeycannotbeset', null));
  }
  
  public function testSetGet() {
    $response = new BaseHttpResponse();
    $response->set('param1', '12345');
    $response->set('param2', '67890');
    $this->assertEquals('12345', $response->get('param1'));
    $this->assertEquals('67890', $response->get('param2'));
  }
  <commit_msg>Passing config object also to response class<commit_after><?php

require dirname(__file__) . '/../classes/BaseHttpResponse.php';

class BaseHttpResponseTest extends PHPUnit_Framework_TestCase {
  
  public function testGetNotSet() {
    $response = new BaseHttpResponse(new ConfigIni(dirname(__FILE__) . '/resources/ConfigIniTest.ini'));
    $this->assertEquals(NULL, $response->get('thiskeycannotbeset', null));
  }
  
  public function testSetGet() {
    $response = new BaseHttpResponse(new ConfigIni(dirname(__FILE__) . '/resources/ConfigIniTest.ini'));
    $response->set('param1', '12345');
    $response->set('param2', '67890');
    $this->assertEquals('12345', $response->get('param1'));
    $this->assertEquals('67890', $response->get('param2'));
  }
  
{'fraction_non_alphanumeric': 0.16874541452677916, 'fraction_numerical': 0.03521643433602348, 'mean_word_length': 5.171945701357466, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '7124243', 'n_tokens_mistral': 434, 'n_tokens_neox': 405, 'n_words': 72}