<commit_before><?php
/**
 * Copyright 2010, Cake Development Corporation (http://cakedc.com)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright Copyright 2010, Cake Development Corporation (http://cakedc.com)
 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

/**
 * CakePHP Ratings Plugin
 *
 * User fixture
 *
 * @package 	ratings
 * @subpackage 	ratings.tests.fixtures
 */
 
if (!class_exists('User')) {
	class User extends Model {
	}
}
class UserFixture extends CakeTestFixture {

/**
 * Name
 *
 * @var string $name
 * @access public
 */
	public $name = 'User';

/**
 * Table
 *
 * @var array $table
 * @access public
 */
	public $table = 'users';

/**
 * Fields
 *
 * @var array $fields
 * @access public
 */
	public $fields = array(
		'id' => array('type'=>'string', 'null' => false, 'length' => 36, 'key' => 'primary'),
		'account_type' => array('type' => 'string', 'null' => false, 'length' => 8),
		'url' => array('type'=>'string', 'null' => false, 'key' => 'unique'),
		'slug' => array('type'=>'string', 'null' => false),
		'username' => array('type'=>'string', 'null' => false),
		'email' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 255),
		'email_authenticated' => array('type'=>'boolean', 'null' => false, 'default' => '0'),
		'email_token' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 255),
		'email_token_expires' => array('type'=>'datetime', 'null' => true, 'default' => NULL),
		'passwd' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 128),
		'password_token' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 128),
		'tos' => array('type'=>'boolean', 'null' => false, 'default' => '0'),
		'active' => array('type'=>'boolean', 'null' => false, 'default' => '0'),
		'public_master_key' => array('type'=>'text', 'null' => true, 'default' => NULL),
		'public_session_key' => array('type'=>'text', 'null' => true, 'default' => NULL),
		'private_session_key' => array('type'=>'text', 'null' => true, 'default' => NULL),
		'last_activity' => array('type'=>'datetime', 'null' => true, 'default' => NULL),
		'created' => array('type'=>'datetime', 'null' => true, 'default' => NULL),
		'modified' => array('type'=>'datetime', 'null' => true, 'default' => NULL),
		'indexes' => array(
			'PRIMARY' => array('column' => 'id', 'unique' => 1),
			'UNIQUE_URL' => array('column' => 'url', 'unique' => 1)
		)
	);
/**
 * Records
 *
 * @var array $records
 * @access public
 */
	public $records = array(
		array(
			'id'  => '1',
			'account_type'  => 'local',
			'url'  => '/user/phpnut',
			'slug' => 'phpnut',
			'username'  => 'phpnut',
			'email' => '<EMAIL>',
			'email_authenticated' => 1,
			'email_token' => '<PASSWORD>',
			'email_token_expires' => '2008-03-25 02:45:46',
			'passwd'  => '<PASSWORD>', // <PASSWORD>
			'password_token'  => 'testtoken',
			'tos' => 1,
			'active' => 1,
			'public_master_key'  => '',
			'public_session_key'  => '',
			'private_session_key'  => '',
			'last_activity'  => '2008-03-25 02:45:46',
			'created'  => '2008-03-25 02:45:46',
			'modified'  => '2008-03-25 02:45:46'
		),
		array(
			'id'  => '2',
			'account_type'  => 'remote',
			'url'  => '/user/floriank',
			'slug' => 'floriank',
			'username'  => 'floriank',
			'email' => '<EMAIL>',
			'email_authenticated' => '1',
			'email_token' => '',
			'email_token_expires' => '2008-03-25 02:45:46',
			'passwd'  => '<PASSWORD>', // secretkey
			'password_token'  => '',
			'tos' => 1,
			'active' => 1,
			'public_master_key'  => '',
			'public_session_key'  => '',
			'private_session_key'  => '',
			'last_activity'  => '2008-03-25 02:45:46',
			'created'  => '2008-03-25 02:45:46',
			'modified'  => '2008-03-25 02:45:46'
		),
		array(
			'id'  => '3',
			'account_type'  => 'remote',
			'url'  => '/user/user1',
			'slug' => 'user1',
			'username'  => 'user1',
			'email' => '<EMAIL>',
			'email_authenticated' => 0,
			'email_token' => '<PASSWORD>',
			'email_token_expires' => '2008-03-28 02:45:46',
			'passwd'  => '<PASSWORD>', // new<PASSWORD>
			'password_token'  => '',
			'tos' => 0,
			'active' => 0,
			'public_master_key'  => '',
			'public_session_key'  => '',
			'private_session_key'  => '',
			'last_activity'  => '2008-03-25 02:45:46',
			'created'  => '2008-03-25 02:45:46',
			'modified'  => '2008-03-25 02:45:46'
		),
		array(
			'id' => '4',
			'account_type' => 'local',
			'url'  => '/user/oidtest',
			'slug' => 'oistest',
			'username'  => 'oidtest',
			'email' => '<EMAIL>',
			'email_authenticated' => 0,
			'email_token' => '<PASSWORD>',
			'email_token_expires' => '2008-03-28 02:45:46',
			'passwd'  => '<PASSWORD>', // <PASSWORD>
			'password_token'  => '',
			'tos' => 0,
			'active' => 0,
			'public_master_key'  => '',
			'public_session_key'  => '',
			'private_session_key'  => '',
			'last_activity'  => '2008-03-25 02:45:46',
			'created'  => '2008-03-25 02:45:46',
			'modified'  => '2008-03-25 02:45:46'
		)
	);

/**
 *
 */
	public function __construct() {
		parent::__construct();
		App::uses('Security', 'Utility');
		foreach ($this->records as &$record) {
			$record['passwd'] = Security::hash($record['passwd'], null, true);
		}<commit_msg>updated UserFixture to what User plugin actually uses<commit_after><?php
/**
 * Copyright 2010, Cake Development Corporation (http://cakedc.com)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright Copyright 2010, Cake Development Corporation (http://cakedc.com)
 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

/**
 * CakePHP Ratings Plugin
 *
 * User fixture
 *
 * @package 	ratings
 * @subpackage 	ratings.tests.fixtures
 */
 
if (!class_exists('User')) {
	class User extends Model {
	}
}
class UserFixture extends CakeTestFixture {

/**
 * Name
 *
 * @var string $name
 * @access public
 */
	public $name = 'User';

/**
 * Table
 *
 * @var array $table
 * @access public
 */
	public $table = 'users';

/**
 * Fields
 *
 * @var array $fields
 * @access public
 */
	public $fields = array(
		'id' => array('type'=>'string', 'null' => false, 'length' => 36, 'key' => 'primary'),
		'account_type' => array('type' => 'string', 'null' => false, 'length' => 8),
		'url' => array('type'=>'string', 'null' => false, 'key' => 'unique'),
		'slug' => array('type'=>'string', 'null' => false),
		'username' => array('type'=>'string', 'null' => false),
		'email' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 255),
		'email_verified' => array('type'=>'boolean', 'null' => false, 'default' => '0'),
		'email_token' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 255),
		'email_token_expires' => array('type'=>'datetime', 'null' => true, 'default' => NULL),
		'passwd' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 128),
		'password_token' => array('type'=>'string', 'null' => true, 'default' => NULL, 'length' => 128),
		'tos' => array('type'=>'boolean', 'null' => false, 'default' => '0'),
		'active' => array('type'=>'boolean', 'null' => false, 'default' => '0'),
		'public_master_key' => array('type'=>'text', 'null' => true, 'default' => NULL),
		'public_session_key' => array('type'=>'text', 'null' => true, 'default' => NULL),
		'private_session_key' => array('type'=>'text', 'null' => true, 'default' => NULL),
		'last_activity' => array('type'=>'datetime', 'null' => true, 'default' => NULL),
		'created' => array('type'=>'datetime', 'null' => true, 'default' => NULL),
		'modified' => array('type'=>'datetime', 'null' => true, 'default' => NULL),
		'indexes' => array(
			'PRIMARY' => array('column' => 'id', 'unique' => 1),
			'UNIQUE_URL' => array('column' => 'url', 'unique' => 1)
		)
	);
/**
 * Records
 *
 * @var array $records
 * @access public
 */
	public $records = array(
		array(
			'id'  => '1',
			'account_type'  => 'local',
			'url'  => '/user/phpnut',
			'slug' => 'phpnut',
			'username'  => 'phpnut',
			'email' => '<EMAIL>',
			'email_verified' => 1,
			'email_token' => '<PASSWORD>',
			'email_token_expires' => '2008-03-25 02:45:46',
			'passwd'  => '<PASSWORD>', // test
			'password_token'  => '<PASSWORD>',
			'tos' => 1,
			'active' => 1,
			'public_master_key'  => '',
			'public_session_key'  => '',
			'private_session_key'  => '',
			'last_activity'  => '2008-03-25 02:45:46',
			'created'  => '2008-03-25 02:45:46',
			'modified'  => '2008-03-25 02:45:46'
		),
		array(
			'id'  => '2',
			'account_type'  => 'remote',
			'url'  => '/user/floriank',
			'slug' => 'floriank',
			'username'  => 'floriank',
			'email' => '<EMAIL>',
			'email_verified' => '1',
			'email_token' => '',
			'email_token_expires' => '2008-03-25 02:45:46',
			'passwd'  => '<PASSWORD>', // secretkey
			'password_token'  => '',
			'tos' => 1,
			'active' => 1,
			'public_master_key'  => '',
			'public_session_key'  => '',
			'private_session_key'  => '',
			'last_activity'  => '2008-03-25 02:45:46',
			'created'  => '2008-03-25 02:45:46',
			'modified'  => '2008-03-25 02:45:46'
		),
		array(
			'id'  => '3',
			'account_type'  => 'remote',
			'url'  => '/user/user1',
			'slug' => 'user1',
			'username'  => 'user1',
			'email' => '<EMAIL>',
			'email_verified' => 0,
			'email_token' => '<PASSWORD>',
			'email_token_expires' => '2008-03-28 02:45:46',
			'passwd'  => '<PASSWORD>', // <PASSWORD>
			'password_token'  => '',
			'tos' => 0,
			'active' => 0,
			'public_master_key'  => '',
			'public_session_key'  => '',
			'private_session_key'  => '',
			'last_activity'  => '2008-03-25 02:45:46',
			'created'  => '2008-03-25 02:45:46',
			'modified'  => '2008-03-25 02:45:46'
		),
		array(
			'id' => '4',
			'account_type' => 'local',
			'url'  => '/user/oidtest',
			'slug' => 'oistest',
			'username'  => 'oidtest',
			'email' => '<EMAIL>',
			'email_verified' => 0,
			'email_token' => 'testtoken2',
			'email_token_expires' => '2008-03-28 02:45:46',
			'passwd'  => '<PASSWORD>', // <PASSWORD>
			'password_token'  => '',
			'tos' => 0,
			'active' => 0,
			'public_master_key'  => '',
			'public_session_key'  => '',
			'private_session_key'  => '',
			'last_activity'  => '2008-03-25 02:45:46',
			'created'  => '2008-03-25 02:45:46',
			'modified'  => '2008-03-25 02:45:46'
		)
	);

/**
 *
 */
	public function __construct() {
		parent::__construct();
		App::uses('Security', 'Utility');
		foreach ($this->records as &$record) {
			$record['passwd'] = Security::hash($record['passwd'], null, true);
		}
{'fraction_non_alphanumeric': 0.24846828164765766, 'fraction_numerical': 0.051182957865962865, 'mean_word_length': 3.7835888187556357, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 356, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4983161', 'n_tokens_mistral': 4712, 'n_tokens_neox': 4019, 'n_words': 795}