<commit_before><?php
require_once realpath(__DIR__ . '/../slirTestCase.class.php');

class SLIRTest extends SLIRTestCase
{
  /**
   * @param string $header
   * @return void
   */
  private function assertHeaderSent($header)
  {
    $this->assertTrue(in_array($header, $this->slir->getHeaders()));
  }

  /**
   * @param string $header
   * @return void
   */
  private function assertHeaderNotSent($header)
  {
    $this->assertFalse(in_array($header, $this->slir->getHeaders()));
  }

  /**
   * @test
   */
  public function escapeOutputBuffering()
  {
    ob_start();
    ob_start();
    ob_start();
    $inceptionLevel = ob_get_level();

    SLIR::escapeOutputBuffering();

    $this->assertLessThan($inceptionLevel, ob_get_level());
  }

  /**<commit_msg>Made use of assertContains and assertNotContains<commit_after><?php
require_once realpath(__DIR__ . '/../slirTestCase.class.php');

class SLIRTest extends SLIRTestCase
{
  /**
   * @param string $header
   * @return void
   */
  private function assertHeaderSent($header)
  {
    $this->assertContains($header, $this->slir->getHeaders());
  }

  /**
   * @param string $header
   * @return void
   */
  private function assertHeaderNotSent($header)
  {
    $this->assertNotContains($header, $this->slir->getHeaders());
  }

  /**
   * @test
   */
  public function escapeOutputBuffering()
  {
    ob_start();
    ob_start();
    ob_start();
    $inceptionLevel = ob_get_level();

    SLIR::escapeOutputBuffering();

    $this->assertLessThan($inceptionLevel, ob_get_level());
  }

  /**
{'fraction_non_alphanumeric': 0.15901745313510018, 'fraction_numerical': 0.0, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '5425583', 'n_tokens_mistral': 510, 'n_tokens_neox': 501, 'n_words': 85}