<commit_before><?php

namespace Masterkey\Tests\Repositories;

use Illuminate\Cache\Repository;
use Illuminate\Support\Collection;
use Masterkey\Tests\Models\FileRepository;
use PHPUnit\Framework\TestCase;

class FileRepositoryTest extends TestCase
{
    protected $files;

    /**
     * @var Repository
     */
    protected $cache;

    public function __construct()
    {
        global $app;

        $this->files    = new FileRepository($app);
        $this->cache    = $app->make('cache');

        parent::__construct();
    }

    public function test_cache_of_all()
    {
        $all = $this->files->all();

        $this->assertInstanceOf(Collection::class, $all);
    }
}
<commit_msg>Correcao do teste de verificacao da insercao no cache<commit_after><?php

namespace Masterkey\Tests\Repositories;

use Illuminate\Cache\Repository;
use Illuminate\Support\Collection;
use Masterkey\Tests\Models\FileRepository;
use PHPUnit\Framework\TestCase;

class FileRepositoryTest extends TestCase
{
    protected $files;

    /**
     * @var Repository
     */
    protected $cache;

    public function __construct()
    {
        global $app;

        $this->files    = new FileRepository($app);
        $this->cache    = $app->make('cache');

        parent::__construct();
    }

    public function test_cache_of_all()
    {
        $all    = $this->files->all();
        $cache  = $this->cache->has('Masterkey\\Tests\\Models\\FileRepository@all-f827e42a16eb250430cb3fe01ffa24bb');
        $cached = $this->cache->get('Masterkey\\Tests\\Models\\FileRepository@all-f827e42a16eb250430cb3fe01ffa24bb');

        $this->assertInstanceOf(Collection::class, $all);
        $this->assertInstanceOf(Collection::class, $cached);
        $this->assertTrue($cache);
    }
}

{'fraction_non_alphanumeric': 0.13284341435839458, 'fraction_numerical': 0.02035048049745619, 'mean_word_length': 3.0972222222222223, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '7138345', 'n_tokens_mistral': 560, 'n_tokens_neox': 540, 'n_words': 93}