<commit_before><?php

namespace Phrisby;

use Phrisby\Exceptions\ExpectFailedException;

class TestCase {

	private $response;
	private $header_sets;
	private $exceptions = array();

	public function __construct( $response, array $response_headers = null ) {
		$this->response    = $response;
		$this->header_sets = $response_headers;
	}

	/**
	 * @param int  $status
	 * @param null $hop
	 * @return $this
	 * @throws Exceptions\ExpectFailedException
	 */
	public function expectStatus( $status = 200, $hop = null ) {
		$headers = $this->hopHeaders($hop);

		preg_match('|HTTP/\d\.\d\s+(\d+)\s+.*|', $headers[0], $match);

		if( $match[1] != $status ) {
			self::$exceptions[] = new ExpectFailedException('Expected status ' . var_export($match[1], true) . ' to match ' . var_export($status, true));
		}

		return $this;
	}

	/**
	 * @param string   $key
	 * @param string   $value
	 * @param null|int $hop
	 * @return $this
	 */
	public function expectHeader( $key, $value, $hop = null ) {
		$headers = $this->hopHeaders($hop);

		return $this;
	}

	/**
	 * @param  string  $key
	 * @param   string $value
	 * @param null|int $hop
	 * @return $this
	 */
	public function expectHeaderContains( $key, $value, $hop = null ) {
		$headers = $this->hopHeaders($hop);

		return $this;
	}

	public function expectBody( $value ) {

		return $this;
	}

	public function expectBodyContains( $value ) {

		return $this;
	}

	private function output() {

	}

}<commit_msg>Exceptions made public so I can get to them externally<commit_after><?php

namespace Phrisby;

use Phrisby\Exceptions\ExpectFailedException;

class TestCase {

	public static $exceptions = array();
	private $response;
	private $header_sets;

	public function __construct( $response, array $response_headers = null ) {
		$this->response    = $response;
		$this->header_sets = $response_headers;
	}

	/**
	 * @param int  $status
	 * @param null $hop
	 * @return $this
	 * @throws Exceptions\ExpectFailedException
	 */
	public function expectStatus( $status = 200, $hop = null ) {
		$headers = $this->hopHeaders($hop);

		preg_match('|HTTP/\d\.\d\s+(\d+)\s+.*|', $headers[0], $match);

		if( $match[1] != $status ) {
			self::$exceptions[] = new ExpectFailedException('Expected status ' . var_export($match[1], true) . ' to match ' . var_export($status, true));
		}

		return $this;
	}

	/**
	 * @param string   $key
	 * @param string   $value
	 * @param null|int $hop
	 * @return $this
	 */
	public function expectHeader( $key, $value, $hop = null ) {
		$headers = $this->hopHeaders($hop);

		return $this;
	}

	/**
	 * @param  string  $key
	 * @param   string $value
	 * @param null|int $hop
	 * @return $this
	 */
	public function expectHeaderContains( $key, $value, $hop = null ) {
		$headers = $this->hopHeaders($hop);

		return $this;
	}

	public function expectBody( $value ) {

		return $this;
	}

	public function expectBodyContains( $value ) {

		return $this;
	}

	private function hopHeaders( $hop = null ) {
		if( $hop === null ) {
			return end($this->header_sets);
		}

		return $this->header_sets[$hop];
	}

	private function output() {

	}

}
{'fraction_non_alphanumeric': 0.16078305519897304, 'fraction_numerical': 0.0038510911424903724, 'mean_word_length': 3.557017543859649, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '7215207', 'n_tokens_mistral': 1138, 'n_tokens_neox': 1034, 'n_words': 264}