<commit_before><?php

use Carbon\Carbon;
use Illuminate\Support\Collection;
use League\FactoryMuffin\Facade as FactoryMuffin;


/**
 * Class CategoryControllerTest
 */
class CategoryControllerTest extends TestCase
{
    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     */
    public function setUp()
    {
        parent::setUp();
    }

    /**
     * This method is called before the first test of this test class is run.
     *
     * @since Method available since Release 3.4.0
     */
    public static function setUpBeforeClass()
    {
        parent::setUpBeforeClass();
    }

    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     */
    public function tearDown()
    {
        parent::tearDown();

    }

    public function testCreate()
    {
        $category = FactoryMuffin::create('FireflyIII\Models\Category');
        $this->be($category->user);

        $this->call('GET', '/categories/create');
        $this->assertResponseOk();
        $this->assertViewHas('subTitle', 'Create a new category');
    }

    public function testDelete()
    {

        $category = FactoryMuffin::create('FireflyIII\Models\Category');
        $this->be($category->user);

        $this->call('GET', '/categories/delete/' . $category->id);
        $this->assertResponseOk();
        $this->assertViewHas('subTitle', 'Delete category' . e($category->name) . '"');<commit_msg>Fixed test to match fixed controller.<commit_after><?php

use Carbon\Carbon;
use Illuminate\Support\Collection;
use League\FactoryMuffin\Facade as FactoryMuffin;


/**
 * Class CategoryControllerTest
 */
class CategoryControllerTest extends TestCase
{
    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     */
    public function setUp()
    {
        parent::setUp();
    }

    /**
     * This method is called before the first test of this test class is run.
     *
     * @since Method available since Release 3.4.0
     */
    public static function setUpBeforeClass()
    {
        parent::setUpBeforeClass();
    }

    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     */
    public function tearDown()
    {
        parent::tearDown();

    }

    public function testCreate()
    {
        $category = FactoryMuffin::create('FireflyIII\Models\Category');
        $this->be($category->user);

        $this->call('GET', '/categories/create');
        $this->assertResponseOk();
        $this->assertViewHas('subTitle', 'Create a new category');
    }

    public function testDelete()
    {

        $category = FactoryMuffin::create('FireflyIII\Models\Category');
        $this->be($category->user);

        $this->call('GET', '/categories/delete/' . $category->id);
        $this->assertResponseOk();
        $this->assertViewHas('subTitle', 'Delete category "' . e($category->name) . '"');
{'fraction_non_alphanumeric': 0.1308531109685696, 'fraction_numerical': 0.001924310455420141, 'mean_word_length': 2.6436915887850465, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '7477620', 'n_tokens_mistral': 874, 'n_tokens_neox': 855, 'n_words': 233}