<commit_before><?php

namespace Tests;

use Illuminate\Database\Eloquent\Model;
use Laracore\Repository\ModelRepository;
use Laracore\Repository\Relation\RelationInterface;
use Mockery\Mock;

class ModelRepositoryTest extends TestCase
{
    /**
     * @var ModelRepository|Mock
     */
    private $repository;

    /**
     * {@inheritdoc}
     */
    public function setUp()
    {
        parent::setUp();

        $repository = \Mockery::mock(ModelRepository::class)->makePartial();

        $this->repository = $repository;
    }

    public function createMockModel()
    {
        $model = \Mockery::mock(Model::class);
        return $model;
    }

    public function testSetModelAndGetModel()
    {
        $className = 'Test';
        $this->repository->setModel($className);
        $this->assertEquals($this->repository->getModel(), $className);
    }

    public function testSetAndGetRelationRepository()
    {
        $repository = \Mockery::mock(RelationInterface::class);
        $this->repository->setRelationRepository($repository);
        $this->assertEquals($repository, $this->repository->getRelationRepository());
    }

    public function testNewModel()
    {
        $this->stub();
    }
}<commit_msg>more test stubs, completed test<commit_after><?php

namespace Tests;

use Illuminate\Database\Eloquent\Model;
use Laracore\Repository\ModelRepository;
use Laracore\Repository\Relation\RelationInterface;
use Mockery\Mock;

class ModelRepositoryTest extends TestCase
{
    /**
     * @var ModelRepository|Mock
     */
    private $repository;

    /**
     * {@inheritdoc}
     */
    public function setUp()
    {
        parent::setUp();

        $repository = \Mockery::mock(ModelRepository::class)->makePartial();

        $this->repository = $repository;
    }

    public function createMockModel()
    {
        $model = \Mockery::mock(Model::class);
        return $model;
    }

    public function testSetModelAndGetModel()
    {
        $className = 'Test';
        $this->repository->setModel($className);
        $this->assertEquals($this->repository->getModel(), $className);
    }

    public function testSetAndGetRelationRepository()
    {
        $repository = \Mockery::mock(RelationInterface::class);
        $this->repository->setRelationRepository($repository);
        $this->assertEquals($repository, $this->repository->getRelationRepository());
    }

    /**
     * @expectedException PHPUnit_Framework_Error
     */
    public function testSetRelationRepositoryIncorrectClass()
    {
        $this->repository->setRelationRepository(null);
    }

    public function testGetModel()
    {
        $this->stub();
    }

    public function testNewModel()
    {
        $this->stub();
    }
}
{'fraction_non_alphanumeric': 0.13202042304886943, 'fraction_numerical': 0.0, 'mean_word_length': 2.9696092619392185, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, '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': '1529524', 'n_tokens_mistral': 765, 'n_tokens_neox': 756, 'n_words': 124}