<commit_before><?php
/*
 * Created on Jan 25, 2009
 */

use crazedsanity\core\ToolBox;

class testOfCSPHPXML extends PHPUnit_Framework_TestCase {
	
	//-------------------------------------------------------------------------
	function __construct() {
		
		ToolBox::$debugPrintOpt = 1;
		
	}//end __construct()
	//-------------------------------------------------------------------------



	function test_basics() { 
		$testXml = new _testXml;
		$testXml->rootElement = 'mAiN';
		$testXml->preserveCase = true;
		$fixPathTests = array(
			'/mAiN/TEST/1/STUFF'	=> '/mAiN/0/TEST/1/STUFF/0',
			'/'						=> '',
			'/mAiN/0/TEST'			=> '/mAiN/0/TEST/0',
			'/mAiN/0/TEST/0/ONE/1'	=> '/mAiN/0/TEST/0/ONE/1'
		);
		try {
			foreach($fixPathTests as $fixThis => $matchesThis) {
				$testXml->preserveCase = true;
				$this->assertEquals($testXml->fix_path($fixThis), $matchesThis);

				$testXml->preserveCase = false;
				$this->assertEquals($testXml->fix_path($fixThis), strtoupper($matchesThis));
			}
		}
		catch(Exception $e) {
			throw new exception("Failed basic fix_path() test... ". $e->getMessage());
		}
<commit_msg>Stop printing debugging info in tests<commit_after><?php
/*
 * Created on Jan 25, 2009
 */

use crazedsanity\core\ToolBox;

class testOfCSPHPXML extends PHPUnit_Framework_TestCase {
	
	//-------------------------------------------------------------------------
	function __construct() {
		
//		ToolBox::$debugPrintOpt = 1;
		
	}//end __construct()
	//-------------------------------------------------------------------------



	function test_basics() { 
		$testXml = new _testXml;
		$testXml->rootElement = 'mAiN';
		$testXml->preserveCase = true;
		$fixPathTests = array(
			'/mAiN/TEST/1/STUFF'	=> '/mAiN/0/TEST/1/STUFF/0',
			'/'						=> '',
			'/mAiN/0/TEST'			=> '/mAiN/0/TEST/0',
			'/mAiN/0/TEST/0/ONE/1'	=> '/mAiN/0/TEST/0/ONE/1'
		);
		try {
			foreach($fixPathTests as $fixThis => $matchesThis) {
				$testXml->preserveCase = true;
				$this->assertEquals($testXml->fix_path($fixThis), $matchesThis);

				$testXml->preserveCase = false;
				$this->assertEquals($testXml->fix_path($fixThis), strtoupper($matchesThis));
			}
		}
		catch(Exception $e) {
			throw new exception("Failed basic fix_path() test... ". $e->getMessage());
		}

{'fraction_non_alphanumeric': 0.2924028268551237, 'fraction_numerical': 0.0176678445229682, 'mean_word_length': 2.011968085106383, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, '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': '7184328', 'n_tokens_mistral': 900, 'n_tokens_neox': 772, 'n_words': 119}