<commit_before><?php

namespace Spatie\Activitylog\Test;

use Artisan;
use Carbon\Carbon;
use Spatie\Activitylog\Models\Activity;

class CleanActivitylogCommandTest extends TestCase
{
    public function setUp()
    {
        parent::setUp();

        Carbon::setTestNow(Carbon::create(2016, 1, 1, 00, 00, 00));
    }

    /** @test */
    public function it_can_clean_the_activity_log()
    {
        collect(range(1, 60))->each(function (int $index) {
            Activity::create([
                'description' => "item {$index}",
                'created_at' => Carbon::now()->subDays($index)->startOfDay(),
            ]);
        });<commit_msg>fix tests<commit_after><?php

namespace Spatie\Activitylog\Test;

use Artisan;
use Carbon\Carbon;
use Spatie\Activitylog\Models\Activity;

class CleanActivitylogCommandTest extends TestCase
{
    public function setUp()
    {
        parent::setUp();

        Carbon::setTestNow(Carbon::create(2016, 1, 1, 00, 00, 00));

        $this->app['config']->set('laravel-activitylog.delete_records_older_than_days', 31);
    }

    /** @test */
    public function it_can_clean_the_activity_log()
    {
        collect(range(1, 60))->each(function (int $index) {
            Activity::create([
                'description' => "item {$index}",
                'created_at' => Carbon::now()->subDays($index)->startOfDay(),
            ]);
        });
{'fraction_non_alphanumeric': 0.15279770444763272, 'fraction_numerical': 0.02295552367288379, 'mean_word_length': 2.801089918256131, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '1351488', 'n_tokens_mistral': 461, 'n_tokens_neox': 421, 'n_words': 77}