<commit_before><?php
namespace AndreasWolf\DebuggerClient\Tests\Unit\Protocol;

use AndreasWolf\DebuggerClient\Protocol\DebugSession;
use AndreasWolf\DebuggerClient\Tests\Unit\UnitTestCase;


/**
 *
 *
 * @author <NAME> <<EMAIL>>
 */
class DebugSessionTest extends UnitTestCase {

	/**
	 * @test
	 */
	public function newSessionIsNotInitialized() {
		$session = new DebugSession();
		$this->assertFalse($session->isInitialized());
	}

}<commit_msg>[TASK] Add a few unit tests for transaction handling<commit_after><?php
namespace AndreasWolf\DebuggerClient\Tests\Unit\Protocol;

use AndreasWolf\DebuggerClient\Protocol\DebuggerCommand;
use AndreasWolf\DebuggerClient\Protocol\DebugSession;
use AndreasWolf\DebuggerClient\Tests\Unit\UnitTestCase;


/**
 *
 *
 * @author <NAME> <<EMAIL>>
 */
class DebugSessionTest extends UnitTestCase {

	/**
	 * @test
	 */
	public function newSessionIsNotInitialized() {
		$session = new DebugSession();
		$this->assertFalse($session->isInitialized());
	}

	/**
	 * @test
	 */
	public function transactionsAreCorrectlyCreated() {
		$session = new DebugSession();
		/** @var DebuggerCommand $command */
		$command = $this->getMock('AndreasWolf\DebuggerClient\Protocol\DebuggerCommand');

		$transaction = $session->startTransaction($command);

		$this->assertSame(0, $transaction->getId());
	}

	/**
	 * @test
	 */
	public function consecutiveTransactionsHaveDifferentIds() {
		$session = new DebugSession();
		/** @var DebuggerCommand $command */
		$command = $this->getMock('AndreasWolf\DebuggerClient\Protocol\DebuggerCommand');

		$transactionA = $session->startTransaction($command);
		$transactionB = $session->startTransaction($command);

		$this->assertNotEquals($transactionA->getId(), $transactionB->getId());
	}

}
{'fraction_non_alphanumeric': 0.14789533560864618, 'fraction_numerical': 0.0005688282138794084, 'mean_word_length': 5.350180505415162, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 23, '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': '6599939', 'n_tokens_mistral': 545, 'n_tokens_neox': 512, 'n_words': 88}