UsersFixture.php
6.08 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
namespace App\Test\Fixture;
use Cake\TestSuite\Fixture\TestFixture;
/**
* UsersFixture
*
*/
class UsersFixture extends TestFixture
{
public $import = ['model' => 'Users'];
/**
* 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],
'groupes_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_groupes_thematique_id' => ['type' => 'index', 'columns' => ['groupes_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_groupes_thematique_id' => ['type' => 'foreign', 'columns' => ['groupes_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 Prénom
/////'nom' => 'user1 SUPER',
'nom' => 'SUPER user1',
//'nom' => 'test1 test2',
// LOGIN
//'username' => 'testa',
//////'username' => 'user1_SUPER',
'username' => 'u1SUPER',
'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
//'email' => 'testa@test.fr',
//////'email' => 'user1_SUPER@test.fr',
'email' => 'user1.SUPER@test.fr',
'role' => 'Super Administrateur',
'groupes_metier_id' => 1,
'groupes_thematique_id' => 1
],
// Adminplus
[
//'id' => 2,
//'nom' => 'test3 test4',
/////'nom' => 'user2 ADMINP',
'nom' => 'ADMINP user2',
//'username' => 'testz',
//////'username' => 'user2_ADMINPLUS',
'username' => 'u2ADMINP',
'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
/////'email' => 'testz@test.fr',
'email' => 'user2.ADMINP@test.fr',
'role' => 'Administration Plus',
'groupes_metier_id' => 1,
'groupes_thematique_id' => 1
],
// Admin
[
//'id' => 3,
///////'nom' => 'user3 ADMIN',
//'nom' => 'test5 test6',
//'nom' => 'test6 test5',
'nom' => 'ADMIN user3',
//'username' => 'teste',
/////'username' => 'user3_ADMIN',
'username' => 'u3ADMIN',
'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
/////'email' => 'teste@test.fr',
'email' => 'user3.ADMIN@test.fr',
'role' => 'Administration',
'groupes_metier_id' => 1,
'groupes_thematique_id' => 1
],
// Responsable
[
//'id' => 4,
/////'nom' => 'user4 RESP',
//'nom' => 'test7 test8',
//'nom' => 'test8 test7',
'nom' => 'RESP user4',
//'username' => 'testr',
////'username' => 'user4_RESP',
'username' => 'u4RESP',
'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
/////'email' => 'testr@test.fr',
'email' => 'user4.RESP@test.fr',
'role' => 'Responsable',
'groupes_metier_id' => 1,
'groupes_thematique_id' => 1
],
// User (simple user, authentified, but no priviledge)
[
//'id' => 5,
///////'nom' => 'user5 USER',
//'nom' => 'test9 test0',
//'nom' => 'test0 test9',
'nom' => 'USER user5',
//'username' => 'testt',
////'username' => 'user5_USER',
'username' => 'u5USER',
'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
////'email' => 'testt@test.fr',
'email' => 'user5.USER@test.fr',
'role' => 'Utilisateur',
'groupes_metier_id' => 1,
'groupes_thematique_id' => 1
],
];
}