FakeldapusersFixture.php
3.49 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
<?php
namespace App\Test\Fixture;
use Cake\TestSuite\Fixture\TestFixture;
/**
* UsersFixture
*
*/
class FakeldapusersFixture extends TestFixture
{
/**
* Fields
*
* @var array
*/
// @codingStandardsIgnoreStart
public $fields = [
'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
'sn' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'givenname' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'uid' => ['type' => 'string', 'length' => 26, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'userpassword' => ['type' => 'string', 'length' => 255, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'mail' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
'_constraints' => [
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
'login_UNIQUE' => ['type' => 'unique', 'columns' => ['uid'], 'length' => []],
],
'_options' => [
'engine' => 'InnoDB',
'collation' => 'latin1_swedish_ci'
],
];
// @codingStandardsIgnoreEnd
/**
* Records
*
* @var array
*/
public $records = [
// Superadmin
[
'id' => 1,
//'sn' => 'test1 test2',
//'sn' => 'user1 SUPER',
'sn' => 'user1',
'givenname' => 'SUPER',
//'username' => 'testa',
'uid' => 'user1_SUPER',
'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
//'email' => 'testa@test.fr',
'mail' => 'user1_SUPER@test.fr',
],
// Adminplus
[
'id' => 2,
//'sn' => 'test3 test4',
//'sn' => 'user2 ADMINP',
'sn' => 'user2',
'givenname' => 'ADMINP',
//'uid' => 'testz',
'uid' => 'user2_ADMINPLUS',
'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
'mail' => 'testz@test.fr',
],
// Admin
[
'id' => 3,
//'sn' => 'test5 test6',
//'sn' => 'user3 ADMIN',
'sn' => 'user3',
'givenname' => 'ADMIN',
//'uid' => 'teste',
'uid' => 'user3_ADMIN',
'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
'mail' => 'teste@test.fr',
],
// Responsable
[
'id' => 4,
//'sn' => 'test7 test8',
//'sn' => 'user4 RESP',
'sn' => 'user4',
'givenname' => 'RESP',
//'uid' => 'testr',
'uid' => 'user4_RESP',
'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
'mail' => 'testr@test.fr',
],
// User (simple user, authentified, but no priviledge)
[
'id' => 5,
//'sn' => 'test9 test0',
//'sn' => 'user5 USER',
'sn' => 'user5',
'givenname' => 'USER',
//'uid' => 'testt',
'uid' => 'user5_USER',
'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
'mail' => 'testt@test.fr',
],
];
}