<commit_before><?php
use Xicrow\Debug\Debugger;

/**
 * Class DebuggerTest
 */
class DebuggerTest extends PHPUnit_Framework_TestCase {
	/**
	 * @test
	 * @covers \Xicrow\Debug\Debugger::getDebugInformation
	 */
	public function testGetDebugInformation() {
		$expected = 'string';
		$result   = Debugger::getDebugInformation('string');
		$this->assertInternalType($expected, $result);

		$expected = 'string';
		$result   = Debugger::getDebugInformation(123);
		$this->assertInternalType($expected, $result);

		$expected = 'null';
		$result   = Debugger::getDebugInformation(null);
		$this->assertContains($expected, $result, '', true);

		$expected = 'false';
		$result   = Debugger::getDebugInformation(false);
		$this->assertContains($expected, $result, '', true);

		$expected = 'int(123)';
		$result   = Debugger::getDebugInformation(123);
		$this->assertContains($expected, $result);

		// Some servers return float() others double(), hence the regEx below
		//		$expected = 'float(123.123)';
		//		$result   = Debugger::getDebugInformation(123.123);
		//		$this->assertContains($expected, $result);

		$expected = '#double|float' . preg_quote('(123.123)', '#') . '#';
		$result   = Debugger::getDebugInformation(123.123);
		$this->assertRegExp($expected, $result);

		$expected = 'string';
		$result   = Debugger::getDebugInformation('string');
		$this->assertContains($expected, $result);

		$data     = [1, 2, 3];
		$expected = print_r($data, true);
		$result   = Debugger::getDebugInformation($data);
		$this->assertContains($expected, $result);

		$data     = new DateTime();
		$expected = print_r($data, true);
		$result   = Debugger::getDebugInformation($data);
		$this->assertContains($expected, $result);
	}

	/**
	 * @test
	 * @covers \Xicrow\Debug\Debugger::getCalledFrom
	 */
	public function testGetCalledFrom() {
		$expected = 'string';
		$result   = Debugger::getCalledFrom();
		$this->assertInternalType($expected, $result);

		$expected = 'DebuggerTest->testGetCalledFrom';
		$result   = Debugger::getCalledFrom();
		$this->assertContains($expected, $result);
	}

	/**
	 * @test
	 * @covers \Xicrow\Debug\Debugger::reflectClass
	 */
	public function testReflectClass() {
		$result = Debugger::reflectClass('\Xicrow\Debug\Debugger');
		$this->assertContains('class Xicrow\Debug\Debugger', $result);
		$this->assertContains('public static $output', $result);
		$this->assertContains('private static function output(', $result);
		$this->assertContains('public static function debug(', $result);
	}

	/**
	 * @test
	 * @covers \Xicrow\Debug\Debugger::reflectClassProperty
	 */
	public function testReflectClassProperty() {
		$result = Debugger::reflectClassProperty('\Xicrow\Debug\Debugger', 'output');
		$this->assertContains('@var bool', $result);
		$this->assertContains('public static $output', $result);
	}

	/**
	 * @test
	 * @covers \Xicrow\Debug\Debugger::reflectClassMethod
	 */
	public function testReflectClassMethod() {
		$result = Debugger::reflectClassMethod('\Xicrow\Debug\Debugger', 'debug');
		$this->assertContains('@param mixed $data', $result);
		$this->assertContains('public static function debug(', $result);
	}
}
<commit_msg>Remove commented code<commit_after><?php
use Xicrow\Debug\Debugger;

/**
 * Class DebuggerTest
 */
class DebuggerTest extends PHPUnit_Framework_TestCase {
	/**
	 * @test
	 * @covers \Xicrow\Debug\Debugger::getDebugInformation
	 */
	public function testGetDebugInformation() {
		$expected = 'string';
		$result   = Debugger::getDebugInformation('string');
		$this->assertInternalType($expected, $result);

		$expected = 'string';
		$result   = Debugger::getDebugInformation(123);
		$this->assertInternalType($expected, $result);

		$expected = 'null';
		$result   = Debugger::getDebugInformation(null);
		$this->assertContains($expected, $result, '', true);

		$expected = 'false';
		$result   = Debugger::getDebugInformation(false);
		$this->assertContains($expected, $result, '', true);

		$expected = 'int(123)';
		$result   = Debugger::getDebugInformation(123);
		$this->assertContains($expected, $result);

		// Some servers return float() others double(), hence the regEx below instead of assertContains()
		$expected = '#double|float' . preg_quote('(123.123)', '#') . '#';
		$result   = Debugger::getDebugInformation(123.123);
		$this->assertRegExp($expected, $result);

		$expected = 'string';
		$result   = Debugger::getDebugInformation('string');
		$this->assertContains($expected, $result);

		$data     = [1, 2, 3];
		$expected = print_r($data, true);
		$result   = Debugger::getDebugInformation($data);
		$this->assertContains($expected, $result);

		$data     = new DateTime();
		$expected = print_r($data, true);
		$result   = Debugger::getDebugInformation($data);
		$this->assertContains($expected, $result);
	}

	/**
	 * @test
	 * @covers \Xicrow\Debug\Debugger::getCalledFrom
	 */
	public function testGetCalledFrom() {
		$expected = 'string';
		$result   = Debugger::getCalledFrom();
		$this->assertInternalType($expected, $result);

		$expected = 'DebuggerTest->testGetCalledFrom';
		$result   = Debugger::getCalledFrom();
		$this->assertContains($expected, $result);
	}

	/**
	 * @test
	 * @covers \Xicrow\Debug\Debugger::reflectClass
	 */
	public function testReflectClass() {
		$result = Debugger::reflectClass('\Xicrow\Debug\Debugger');
		$this->assertContains('class Xicrow\Debug\Debugger', $result);
		$this->assertContains('public static $output', $result);
		$this->assertContains('private static function output(', $result);
		$this->assertContains('public static function debug(', $result);
	}

	/**
	 * @test
	 * @covers \Xicrow\Debug\Debugger::reflectClassProperty
	 */
	public function testReflectClassProperty() {
		$result = Debugger::reflectClassProperty('\Xicrow\Debug\Debugger', 'output');
		$this->assertContains('@var bool', $result);
		$this->assertContains('public static $output', $result);
	}

	/**
	 * @test
	 * @covers \Xicrow\Debug\Debugger::reflectClassMethod
	 */
	public function testReflectClassMethod() {
		$result = Debugger::reflectClassMethod('\Xicrow\Debug\Debugger', 'debug');
		$this->assertContains('@param mixed $data', $result);
		$this->assertContains('public static function debug(', $result);
	}
}

{'fraction_non_alphanumeric': 0.17512038523274479, 'fraction_numerical': 0.009630818619582664, 'mean_word_length': 5.144970414201183, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 44, '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': '734380', 'n_tokens_mistral': 2094, 'n_tokens_neox': 1939, 'n_words': 347}