<commit_before><?php

namespace DavidBadura\Taskwarrior\Test;

use DavidBadura\Taskwarrior\Taskwarrior;
use Symfony\Component\Filesystem\Filesystem;

/**
 * @author <NAME> <<EMAIL>>
 */
class TaskwarriorTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var Taskwarrior
     */
    protected $taskwarrior;

    public function setUp()
    {
        $this->tearDown();
        $this->taskwarrior = new Taskwarrior(__DIR__ . '/.taskrc', __DIR__ . '/.task');
        $this->taskwarrior->version(); // to initialise
    }

    public function tearDown()
    {
        $fs = new Filesystem();
        $fs->remove(__DIR__ . '/.taskrc');
        $fs->remove(__DIR__ . '/.task');
    }


    public function testConfig()
    {
        $config = $this->taskwarrior->config();

        $this->assertInstanceOf('DavidBadura\Taskwarrior\Config', $config);
        $this->assertTrue($config->has('alias._query'));
        $this->assertEquals('export', $config->get('alias._query'));
    }
}<commit_msg>fix test<commit_after><?php

namespace DavidBadura\Taskwarrior\Test;

use DavidBadura\Taskwarrior\Taskwarrior;
use Symfony\Component\Filesystem\Filesystem;

/**
 * @author <NAME> <<EMAIL>>
 */
class TaskwarriorTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var Taskwarrior
     */
    protected $taskwarrior;

    public function setUp()
    {
        $this->tearDown();
        $this->taskwarrior = new Taskwarrior(__DIR__ . '/.taskrc', __DIR__ . '/.task');
        $this->taskwarrior->version(); // to initialise
    }

    public function tearDown()
    {
        $fs = new Filesystem();
        $fs->remove(__DIR__ . '/.taskrc');
        $fs->remove(__DIR__ . '/.task');
    }


    public function testConfig()
    {
        $config = $this->taskwarrior->config();

        $this->assertInstanceOf('DavidBadura\Taskwarrior\Config', $config);
        $this->assertTrue($config->has('urgency.age.max'));
        $this->assertEquals('365', $config->get('urgency.age.max'));
    }
}
{'fraction_non_alphanumeric': 0.1676706827309237, 'fraction_numerical': 0.0015060240963855422, 'mean_word_length': 2.818007662835249, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 35, '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': '3188710', 'n_tokens_mistral': 632, 'n_tokens_neox': 622, 'n_words': 103}