<commit_before><?php
/**
 * ChartBudgetControllerTest.php
 * Copyright (C) 2016 <NAME>
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 */

/**
 * Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:39:57.
 */
class ChartBudgetControllerTest extends TestCase
{

    /**
     * @covers FireflyIII\Http\Controllers\Chart\BudgetController::budget
     */
    public function testBudget()
    {
//        $this->be($this->user());
//        $response = $this->call('GET', '/chart/budget/1');
//        $this->assertEquals(200, $response->status());
        $this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
    }

    /**
     * @covers FireflyIII\Http\Controllers\Chart\BudgetController::budgetLimit
     */
    public function testBudgetLimit()
    {
        $this->be($this->user());
        $response = $this->call('GET', '/chart/budget/1/1');

        $this->assertEquals(200, $response->status());
    }

    /**
     * @covers FireflyIII\Http\Controllers\Chart\BudgetController::frontpage
     */
    public function testFrontpage()
    {
        $this->be($this->user());
        $response = $this->call('GET', '/chart/budget/frontpage');

        $this->assertEquals(200, $response->status());
    }

    /**
     * @covers FireflyIII\Http\Controllers\Chart\BudgetController::multiYear
     */
    public function testMultiYear()
    {
//        $this->be($this->user());
//        $response = $this->call('GET', '/chart/budget/multi-year/default/20150101/20160101/1/1');
//        $this->assertEquals(200, $response->status());
        $this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');

    }

    /**
     * @covers FireflyIII\Http\Controllers\Chart\BudgetController::year
     */
    public function testYear()
    {
//        $this->be($this->user());
//        $response = $this->call('GET', '/chart/budget/year/default/20150101/201512031/1');
//        $this->assertEquals(200, $response->status());
        $this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');

    }
}<commit_msg>Unskipped some tests.<commit_after><?php
/**
 * ChartBudgetControllerTest.php
 * Copyright (C) 2016 <NAME>
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 */
use Carbon\Carbon;
use FireflyIII\Models\Budget;
use Illuminate\Support\Collection;

/**
 * Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:39:57.
 */
class ChartBudgetControllerTest extends TestCase
{

    /**
     * @covers FireflyIII\Http\Controllers\Chart\BudgetController::budget
     */
    public function testBudget()
    {

        $repository = Mockery::mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
        $repository->shouldReceive('getExpensesPerMonth')->once()->andReturn(new Collection([new Budget]));
        $repository->shouldReceive('getFirstBudgetLimitDate')->once()->andReturn(new Carbon);

        $this->app->instance('FireflyIII\Repositories\Budget\BudgetRepositoryInterface', $repository);

        $this->be($this->user());
        $response = $this->call('GET', '/chart/budget/1');
        $this->assertEquals(200, $response->status());
        //$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
    }

    /**
     * @covers FireflyIII\Http\Controllers\Chart\BudgetController::budgetLimit
     */
    public function testBudgetLimit()
    {
        $this->be($this->user());
        $response = $this->call('GET', '/chart/budget/1/1');

        $this->assertEquals(200, $response->status());
    }

    /**
     * @covers FireflyIII\Http\Controllers\Chart\BudgetController::frontpage
     */
    public function testFrontpage()
    {
        $this->be($this->user());
        $response = $this->call('GET', '/chart/budget/frontpage');

        $this->assertEquals(200, $response->status());
    }

    /**
     * @covers FireflyIII\Http\Controllers\Chart\BudgetController::multiYear
     */
    public function testMultiYear()
    {

        $repository = Mockery::mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
        $repository->shouldReceive('getBudgetedPerYear')->once()->andReturn(new Collection);
        $repository->shouldReceive('getBudgetsAndExpensesPerYear')->once()->andReturn([]);

        $this->app->instance('FireflyIII\Repositories\Budget\BudgetRepositoryInterface', $repository);


        $this->be($this->user());
        $response = $this->call('GET', '/chart/budget/multi-year/default/20150101/20160101/1/1');
        $this->assertEquals(200, $response->status());

    }

    /**
     * @covers FireflyIII\Http\Controllers\Chart\BudgetController::year
     */
    public function testYear()
    {
        $repository = Mockery::mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');
        $repository->shouldReceive('getBudgetsAndExpensesPerMonth')->once()->andReturn([]);

        $this->app->instance('FireflyIII\Repositories\Budget\BudgetRepositoryInterface', $repository);

        $this->be($this->user());
        $response = $this->call('GET', '/chart/budget/year/default/20150101/20151231/1');
        $this->assertEquals(200, $response->status());

    }
}
{'fraction_non_alphanumeric': 0.16672939405344372, 'fraction_numerical': 0.026910048927361686, 'mean_word_length': 3.255404323458767, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 80, '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': '6720157', 'n_tokens_mistral': 1723, 'n_tokens_neox': 1570, 'n_words': 241}