<commit_before><?php

namespace Monii\AggregateEventStorage\EventStore\Persistence;

use Monii\AggregateEventStorage\Contract\ContractResolver;
use Monii\AggregateEventStorage\Contract\SimplePhpFqcnContractResolver;
use Monii\AggregateEventStorage\EventStore\EventEnvelope;
use Monii\AggregateEventStorage\EventStore\Transaction\CommitId;
use Monii\AggregateEventStorage\Fixtures\Banking\Account\Account;
use Monii\AggregateEventStorage\Fixtures\Banking\Account\AccountBalanceDecreased;
use Monii\AggregateEventStorage\Fixtures\Banking\Account\AccountBalanceIncreased;
use Monii\AggregateEventStorage\Fixtures\Banking\Account\AccountWasOpened;
use PHPUnit_Framework_TestCase as TestCase;

abstract class PersistenceTest extends TestCase
{
    /**
     * @var ContractResolver
     */
    private $contractResolver;

    /**
     * @var array
     */
    private $fixtures;

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

        $this->loadFixtures($this->createPersistence());
    }

    private function getContractResolver()
    {
        if (! is_null($this->contractResolver)) {
            return $this->contractResolver;
        }

        return $this->contractResolver = new SimplePhpFqcnContractResolver();
    }

    /**
     * Create a persistence instance.
     *<commit_msg>Remove unused variable<commit_after><?php

namespace Monii\AggregateEventStorage\EventStore\Persistence;

use Monii\AggregateEventStorage\Contract\ContractResolver;
use Monii\AggregateEventStorage\Contract\SimplePhpFqcnContractResolver;
use Monii\AggregateEventStorage\EventStore\EventEnvelope;
use Monii\AggregateEventStorage\EventStore\Transaction\CommitId;
use Monii\AggregateEventStorage\Fixtures\Banking\Account\Account;
use Monii\AggregateEventStorage\Fixtures\Banking\Account\AccountBalanceDecreased;
use Monii\AggregateEventStorage\Fixtures\Banking\Account\AccountBalanceIncreased;
use Monii\AggregateEventStorage\Fixtures\Banking\Account\AccountWasOpened;
use PHPUnit_Framework_TestCase as TestCase;

abstract class PersistenceTest extends TestCase
{
    /**
     * @var ContractResolver
     */
    private $contractResolver;

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

        $this->loadFixtures($this->createPersistence());
    }

    private function getContractResolver()
    {
        if (! is_null($this->contractResolver)) {
            return $this->contractResolver;
        }

        return $this->contractResolver = new SimplePhpFqcnContractResolver();
    }

    /**
     * Create a persistence instance.
     *
{'fraction_non_alphanumeric': 0.09126517822169997, 'fraction_numerical': 0.0, 'mean_word_length': 4.265979381443299, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '3230445', 'n_tokens_mistral': 717, 'n_tokens_neox': 727, 'n_words': 110}