<commit_before><?php

App::uses('User', 'Model');

/**
 * Description of UserTest
 *
 * @author mohammad
 */
class UserTest extends CakeTestCase {

    public $fixtures = array('app.user');
    public $User;

    public function setUp() {

        $this->User = ClassRegistry::init('User');
    }

    public function testGetInstance() {

        $created = $this->User->field('created', array('User.username' => 'atkrad'));

        $this->assertEquals($created, '2007-03-17 01:16:23', 'Created Date');
    }

    public function testGetUserData() {
        $result = $this->User->getUserData("1");

        $expected = array(
            array('User' => array('id' => 1, 'username' => 'Ali')),
//            array('Article' => array('id' => 2, 'title' => 'Second Article')),
//            array('Article' => array('id' => 3, 'title' => 'Third Article'))
        );

        $this->assertEquals($expected, $result);
    }

}<commit_msg>Fix user test.<commit_after><?php

App::uses('User', 'Model');

/**
 * Description of UserTest
 *
 * @author mohammad
 */
class UserTest extends CakeTestCase {

    public $fixtures = array('app.user', 'app.userMeta');
    public $User;

    public function setUp() {
        parent::setUp();
        $this->User = ClassRegistry::init('User');
    }

    public function testGetInstance() {
        $created = $this->User->field('created', array('User.username' => 'admin'));

        $this->assertEquals($created, '2007-03-17 01:16:23', 'Created Date');
    }

    public function testGetUserData() {
        $result = $this->User->getUserData(1);

        $expected = array(
            'id' => '1',
            'username' => 'admin',
            'password' => '<PASSWORD>',
            'email' => '<EMAIL>',
            'url' => '',
            'role' => 'admin',
            'activation_key' => '',
            'reset_key' => '',
            'status' => '0',
            'created' => '2007-03-17 01:16:23',
            'modified' => '2007-03-17 01:18:31',
            'firstname' => 'Mohammad',
            'lastname' => '<NAME>',
            'nickname' => 'atkrad',
            'bio' => '',
            'display_name' => 'Mohammad'
        );

        $this->assertEquals($expected, $result);
    }

}
{'fraction_non_alphanumeric': 0.19794917521176994, 'fraction_numerical': 0.02808738296923763, 'mean_word_length': 2.285505124450952, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 47, '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': '787865', 'n_tokens_mistral': 737, 'n_tokens_neox': 676, 'n_words': 137}