UsersFixture.php
5.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
namespace App\Test\Fixture;
use Cake\TestSuite\Fixture\TestFixture;
/**
* UsersFixture
*
*/
class UsersFixture extends TestFixture
{
/**
* Fields
*
* @var array
*/
// @codingStandardsIgnoreStart
public $fields = [
'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
'nom' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'username' => ['type' => 'string', 'length' => 26, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'password' => ['type' => 'string', 'length' => 255, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'email' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'role' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'groupes_metier_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
'groupe_thematique_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
'sur_categorie_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
'_indexes' => [
'fk_users_groupes_travails1' => ['type' => 'index', 'columns' => ['groupes_metier_id'], 'length' => []],
'fk_users_groupe_thematique_id' => ['type' => 'index', 'columns' => ['groupe_thematique_id'], 'length' => []],
'fk_users_sur_categorie_id' => ['type' => 'index', 'columns' => ['sur_categorie_id'], 'length' => []],
],
'_constraints' => [
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
'login_UNIQUE' => ['type' => 'unique', 'columns' => ['username'], 'length' => []],
'fk_users_groupes_travails1' => ['type' => 'foreign', 'columns' => ['groupes_metier_id'], 'references' => ['groupes_metiers', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
'fk_users_groupe_thematique_id' => ['type' => 'foreign', 'columns' => ['groupe_thematique_id'], 'references' => ['groupes_thematiques', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
'fk_users_sur_categorie_id' => ['type' => 'foreign', 'columns' => ['sur_categorie_id'], 'references' => ['sur_categories', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
],
'_options' => [
'engine' => 'InnoDB',
'collation' => 'latin1_swedish_ci'
],
];
// @codingStandardsIgnoreEnd
/**
* Records
*
* @var array
*/
public $records = [
// Superadmin
[
'id' => 1,
//'nom' => 'test1 test2',
'nom' => 'user1 SUPER',
//'username' => 'testa',
'username' => 'user1_SUPER',
'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
//'email' => 'testa@test.fr',
'email' => 'user1_SUPER@test.fr',
'role' => 'Super Administrateur',
'groupes_metier_id' => 1,
'groupe_thematique_id' => 1
],
// Adminplus
[
'id' => 2,
//'nom' => 'test3 test4',
'nom' => 'user2 ADMINP',
//'username' => 'testz',
'username' => 'user2_ADMINPLUS',
'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
'email' => 'testz@test.fr',
'role' => 'Administration Plus',
'groupes_metier_id' => 1,
'groupe_thematique_id' => 1
],
// Admin
[
'id' => 3,
//'nom' => 'test5 test6',
'nom' => 'user3 ADMIN',
//'username' => 'teste',
'username' => 'user3_ADMIN',
'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
'email' => 'teste@test.fr',
'role' => 'Administration',
'groupes_metier_id' => 1,
'groupe_thematique_id' => 1
],
// Responsable
[
'id' => 4,
//'nom' => 'test7 test8',
'nom' => 'user4 RESP',
//'username' => 'testr',
'username' => 'user4_RESP',
'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
'email' => 'testr@test.fr',
'role' => 'Responsable',
'groupes_metier_id' => 1,
'groupe_thematique_id' => 1
],
// User (simple user, authentified, but no priviledge)
[
'id' => 5,
//'nom' => 'test9 test0',
'nom' => 'user5 USER',
//'username' => 'testt',
'username' => 'user5_USER',
'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
'email' => 'testt@test.fr',
'role' => 'Utilisateur',
'groupes_metier_id' => 1,
'groupe_thematique_id' => 1
],
];
}