<commit_before><?php

require_once 'unit_test/unit_test2.php';

class SimplePie_Unit_Test2_Group extends Unit_Test2_Group
{
	function pre()
	{
		ob_start();
	}
	
	function post()
	{
		$output = ob_get_clean();
		
		$passed_percentage = floor($this->passes() / $this->total() * 100);
		$failed_percentage = ceil($this->fails() / $this->total() * 100);
		
		echo '<h2 class=' . (($passed_percentage == 100) ? 'pass' : 'fail') . '>' . htmlspecialchars($this->name(), ENT_COMPAT, 'UTF-8') . ': ' . $passed_percentage . "% passed!</h2>\n";
		echo "<p>\n$output\n</p>\n";
		echo '<p>We ran ' . $this->total() . ' tests in ' . round($this->time(), 3) . ' seconds of which ' . $this->passes() . ' were passed, and ' . $this->fails() . ' were failed.</p>';
		flush();
	}
}<commit_msg>Unit tests should now work on PHP4.1<commit_after><?php

require_once 'unit_test/unit_test2.php';

class SimplePie_Unit_Test2_Group extends Unit_Test2_Group
{
	function pre()
	{
		ob_start();
	}
	
	function post()
	{
		$output = ob_get_contents();
		
		if ($output !== false)
		{
			ob_end_clean();
		}
		
		$passed_percentage = floor($this->passes() / $this->total() * 100);
		$failed_percentage = ceil($this->fails() / $this->total() * 100);
		
		echo '<h2 class=' . (($passed_percentage == 100) ? 'pass' : 'fail') . '>' . htmlspecialchars($this->name(), ENT_COMPAT, 'UTF-8') . ': ' . $passed_percentage . "% passed!</h2>\n";
		echo "<p>\n$output\n</p>\n";
		echo '<p>We ran ' . $this->total() . ' tests in ' . round($this->time(), 3) . ' seconds of which ' . $this->passes() . ' were passed, and ' . $this->fails() . ' were failed.</p>';
		flush();
	}
}
{'fraction_non_alphanumeric': 0.22440220723482526, 'fraction_numerical': 0.020846106683016553, 'mean_word_length': 3.5971830985915494, 'pattern_counts': {'":': 0, '<': 17, '<?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': '1157859', 'n_tokens_mistral': 678, 'n_tokens_neox': 608, 'n_words': 120}