<commit_before><?php

namespace LiveTest\TestRun;

use Base\Http\HttpClient;

use Base\Timer\Timer;

use Base\Http\ConnectionStatus;

use Base\Www\Uri;

use LiveTest\Extensions\Extension;
use LiveTest\TestCase\Exception;
use LiveTest\TestRun\Result\ResultSet;
use LiveTest\TestRun\Result\Result;

use Base\Http\Response;
use Base\Http\Client;

class Run
{
  /**
   * All properties for the test run
   * 
   * @var LiveTest\TestRun\Properties
   */
  private $properties;
  
  private $httpClient = null;
  
  private $extensions = array();
  
  public function addExtension(Extension $extension)
  {
    $this->extensions[] = $extension;
  }
  
  public function __construct(Properties $properties, HttpClient $httpClient)
  {
    $this->httpClient = $httpClient;
    $this->properties = $properties;
  }
  
  private function extensionsPostRun(Information $information)
  {
    foreach ($this->extensions as $extension)
    {
      $extension->postRun($information);
    }
  }
  
  private function handleResult(Result $result, Response $response)
  {
    foreach ($this->extensions as $extension)
    {
      $extension->handleResult($result, $response);
    }
  }
  
  private function handleConnectionStatus(ConnectionStatus $status)
  {
    foreach ($this->extensions as $extension)
    {
      $extension->handleConnectionStatus($status);
    }
  }
  
  private function extensionsPreRun()
  {
    foreach ($this->extensions as $extension)
    {
      $extension->preRun($this->properties);
    }
  }
  
<<<<<<< HEAD
  private function runTests(TestSet $testSet, \Base\Http\Response $response)
=======
  private function runTests(TestSet $testSet, Response $response)
>>>>>>> branch 'refs/heads/master' of git://github.com/phphatesme/LiveTest.git
  {
    foreach ($testSet->getTests() as $test)
    {
      $testCaseName = $test->getClassName();
      try
      {
        $testCaseObject = new $testCaseName($test->getParameter());
        $testCaseObject->test($response, new Uri($testSet->getUrl()));
        $result = new Result($test, Result::STATUS_SUCCESS, '', $testSet->getUrl());<commit_msg>Removed a conflict from merge.<commit_after><?php

namespace LiveTest\TestRun;

use Base\Http\HttpClient;

use Base\Timer\Timer;

use Base\Http\ConnectionStatus;

use Base\Www\Uri;

use LiveTest\Extensions\Extension;
use LiveTest\TestCase\Exception;
use LiveTest\TestRun\Result\ResultSet;
use LiveTest\TestRun\Result\Result;

use Base\Http\Response;
use Base\Http\Client;

class Run
{
  /**
   * All properties for the test run
   * 
   * @var LiveTest\TestRun\Properties
   */
  private $properties;
  
  private $httpClient = null;
  
  private $extensions = array();
  
  public function addExtension(Extension $extension)
  {
    $this->extensions[] = $extension;
  }
  
  public function __construct(Properties $properties, HttpClient $httpClient)
  {
    $this->httpClient = $httpClient;
    $this->properties = $properties;
  }
  
  private function extensionsPostRun(Information $information)
  {
    foreach ($this->extensions as $extension)
    {
      $extension->postRun($information);
    }
  }
  
  private function handleResult(Result $result, Response $response)
  {
    foreach ($this->extensions as $extension)
    {
      $extension->handleResult($result, $response);
    }
  }
  
  private function handleConnectionStatus(ConnectionStatus $status)
  {
    foreach ($this->extensions as $extension)
    {
      $extension->handleConnectionStatus($status);
    }
  }
  
  private function extensionsPreRun()
  {
    foreach ($this->extensions as $extension)
    {
      $extension->preRun($this->properties);
    }
  }
  

  private function runTests(TestSet $testSet, Response $response)
  {
    foreach ($testSet->getTests() as $test)
    {
      $testCaseName = $test->getClassName();
      try
      {
        $testCaseObject = new $testCaseName($test->getParameter());
        $testCaseObject->test($response, new Uri($testSet->getUrl()));
        $result = new Result($test, Result::STATUS_SUCCESS, '', $testSet->getUrl());
{'fraction_non_alphanumeric': 0.13150752528990872, 'fraction_numerical': 0.0, 'mean_word_length': 3.5245535714285716, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 46, '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': '3923684', 'n_tokens_mistral': 1215, 'n_tokens_neox': 1208, 'n_words': 252}