<commit_before><?php

use Coyote\User;

class UserTest extends \Codeception\TestCase\Test
{
    /**
     * @var \UnitTester
     */
    protected $tester;

    protected function _before()
    {
    }

    protected function _after()
    {
    }

    // tests
    public function testUserRegistration()
    {
        $name = '<NAME>';
        $email = '<EMAIL>';
        $password = <PASSWORD>('password');

        User::create(['name' => $name, 'email' => $email, 'password' => $password]);

        $this->tester->seeRecord('users', ['name' => $name, 'email' => $email, 'password' => $password]);
    }

    public function testIfModelReturnsAdminUserEmail()
    {
        // access model
        $user = User::where('name', 'admin')->first();
        $this->assertEquals('<EMAIL>', $user->email);
    }

    public function testSettingsSaving()
    {
        $user = User::where('name', 'admin')->first();
        $user->setSetting('foo', 'bar');

        $this->assertEquals('{"foo":"bar"}', $user->settings);
        $this->assertEquals('bar', $user->getSetting('foo'));
    }

    public function testSettingsDefault()
    {
        $user = User::where('name', 'admin')->first();
        $this->assertEquals('Lorem ipsum', $user->getSetting('non existing setting', 'Lorem ipsum'));
    }
}<commit_msg>usuniete testy - nie sa potrzebne poniewaz te metody zostaly usuniete z modelu<commit_after><?php

use Coyote\User;

class UserTest extends \Codeception\TestCase\Test
{
    /**
     * @var \UnitTester
     */
    protected $tester;

    protected function _before()
    {
    }

    protected function _after()
    {
    }

    // tests
    public function testUserRegistration()
    {
        $name = '<NAME>';
        $email = '<EMAIL>';
        $password = <PASSWORD>('password');

        User::create(['name' => $name, 'email' => $email, 'password' => $password]);

        $this->tester->seeRecord('users', ['name' => $name, 'email' => $email, 'password' => $password]);
    }

    public function testIfModelReturnsAdminUserEmail()
    {
        // access model
        $user = User::where('name', 'admin')->first();
        $this->assertEquals('<EMAIL>', $user->email);
    }
}
{'fraction_non_alphanumeric': 0.18422252621979024, 'fraction_numerical': 0.0, 'mean_word_length': 2.699831365935919, 'pattern_counts': {'":': 1, '<': 13, '<?xml version=': 0, '>': 42, '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': '6309433', 'n_tokens_mistral': 669, 'n_tokens_neox': 654, 'n_words': 136}