<commit_before><?php
/**
 * This file is part of the SVN-Buddy library.
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 *
 * @copyright <NAME> <<EMAIL>>
 * @link      https://github.com/console-helpers/svn-buddy
 */

namespace Tests\ConsoleHelpers\SVNBuddy\Repository\RevisionLog;


use ConsoleHelpers\SVNBuddy\Repository\RevisionLog\IRevisionLogPlugin;

abstract class AbstractRevisionLogPluginTestCase extends \PHPUnit_Framework_TestCase
{

	/**
	 * Revision log plugin.
	 *
	 * @var IRevisionLogPlugin
	 */
	protected $plugin;

	protected function setUp()
	{
		parent::setUp();

		$this->plugin = $this->createPlugin();
	}

	/**
	 * Expects query to "svn log".
	 *
	 * @return \SimpleXMLElement
	 */
	protected function getSvnLogFixture()
	{
		$svn_log_output = <<<OUTPUT
<?xml version="1.0"?>
<log>
   <logentry revision="20128">
      <author>alex</author>
      <date>2015-10-13T13:30:16.473960Z</date>
      <paths>
         <path action="M" kind="file">/projects/project_a/trunk/sub-folder/file.tpl</path>
         <path action="M" kind="dir">/projects/project_a/trunk/sub-folder</path>
      </paths>
      <msg>JRA-1 - task title</msg>
      <logentry revision="10100"></logentry>
      <logentry revision="10101"></logentry>
   </logentry>
   <logentry revision="20127">
      <author>erik</author>
      <date>2015-10-13T13:00:15.434252Z</date>
      <paths>
         <path action="A" kind="file" unknown-attribute="unknown-value">/projects/project_a/trunk/another_file.php</path>
      </paths>
      <msg>JRA-2 - task title</msg>
   </logentry>
   <logentry revision="20125">
      <author>erik</author>
      <date>2015-10-13T13:00:15.434252Z</date>
      <paths>
         <path action="M" kind="file">/projects/project_a/trunk/another_file.php</path>
      </paths>
      <msg>JRA-1 - task title (reverts JRA-3)</msg>
      <logentry revision="10101"></logentry>
      <logentry revision="10105"></logentry>
   </logentry>
</log>
OUTPUT;

		return new \SimpleXMLElement($svn_log_output);
	}

	/**
	 * Creates plugin.
	 *
	 * @return IRevisionLogPlugin
	 */
	abstract protected function createPlugin();

}
<commit_msg>Enable syntax highlight in SVN fixtures in PhpStorm<commit_after><?php
/**
 * This file is part of the SVN-Buddy library.
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 *
 * @copyright <NAME> <<EMAIL>>
 * @link      https://github.com/console-helpers/svn-buddy
 */

namespace Tests\ConsoleHelpers\SVNBuddy\Repository\RevisionLog;


use ConsoleHelpers\SVNBuddy\Repository\RevisionLog\IRevisionLogPlugin;

abstract class AbstractRevisionLogPluginTestCase extends \PHPUnit_Framework_TestCase
{

	/**
	 * Revision log plugin.
	 *
	 * @var IRevisionLogPlugin
	 */
	protected $plugin;

	protected function setUp()
	{
		parent::setUp();

		$this->plugin = $this->createPlugin();
	}

	/**
	 * Expects query to "svn log".
	 *
	 * @return \SimpleXMLElement
	 */
	protected function getSvnLogFixture()
	{
		$svn_log_output = <<<XML
<?xml version="1.0"?>
<log>
   <logentry revision="20128">
      <author>alex</author>
      <date>2015-10-13T13:30:16.473960Z</date>
      <paths>
         <path action="M" kind="file">/projects/project_a/trunk/sub-folder/file.tpl</path>
         <path action="M" kind="dir">/projects/project_a/trunk/sub-folder</path>
      </paths>
      <msg>JRA-1 - task title</msg>
      <logentry revision="10100"></logentry>
      <logentry revision="10101"></logentry>
   </logentry>
   <logentry revision="20127">
      <author>erik</author>
      <date>2015-10-13T13:00:15.434252Z</date>
      <paths>
         <path action="A" kind="file" unknown-attribute="unknown-value">/projects/project_a/trunk/another_file.php</path>
      </paths>
      <msg>JRA-2 - task title</msg>
   </logentry>
   <logentry revision="20125">
      <author>erik</author>
      <date>2015-10-13T13:00:15.434252Z</date>
      <paths>
         <path action="M" kind="file">/projects/project_a/trunk/another_file.php</path>
      </paths>
      <msg>JRA-1 - task title (reverts JRA-3)</msg>
      <logentry revision="10101"></logentry>
      <logentry revision="10105"></logentry>
   </logentry>
</log>
XML;

		return new \SimpleXMLElement($svn_log_output);
	}

	/**
	 * Creates plugin.
	 *
	 * @return IRevisionLogPlugin
	 */
	abstract protected function createPlugin();

}

{'fraction_non_alphanumeric': 0.15477792732166892, 'fraction_numerical': 0.04531179901301032, 'mean_word_length': 3.3974358974358974, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 2, '>': 111, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6080867', 'n_tokens_mistral': 1677, 'n_tokens_neox': 1503, 'n_words': 279}