Blame view

tests/Fixture/FakeldapusersFixture.php 4.28 KB
bc14f1eb   Etienne Pallier   LDAP CACHED v3
1
2
3
4
5
6
7
8
9
10
11
12
<?php
namespace App\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

/**
 * UsersFixture
 *
 */
class FakeldapusersFixture extends TestFixture
{

93790936   Etienne Pallier   Tests Fixtures =>...
13
    public $import = ['model' => 'Fakeldapusers'];
bc14f1eb   Etienne Pallier   LDAP CACHED v3
14
15
16
17
18
    /**
     * Fields
     *
     * @var array
     */
93790936   Etienne Pallier   Tests Fixtures =>...
19
    /*
bc14f1eb   Etienne Pallier   LDAP CACHED v3
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    // @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
93790936   Etienne Pallier   Tests Fixtures =>...
38
    */
bc14f1eb   Etienne Pallier   LDAP CACHED v3
39
40
41
42
43
44
45
46
47
48

    /**
     * Records
     *
     * @var array
     */
    public $records = [
        
        // Superadmin
        [
bcc25a64   Etienne Pallier   Tests génériques ...
49
            //'id' => 1,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
50
51
            //'sn' => 'test1 test2',
            //'sn' => 'user1 SUPER',
512ca314   Etienne Pallier   Très Gros Bugfix ...
52
            /*
bc14f1eb   Etienne Pallier   LDAP CACHED v3
53
54
            'sn' => 'user1',
            'givenname' => 'SUPER',
512ca314   Etienne Pallier   Très Gros Bugfix ...
55
56
57
            */
            'sn' => 'SUPER',
            'givenname' => 'user1',
bc14f1eb   Etienne Pallier   LDAP CACHED v3
58
            //'username' => 'testa',
512ca314   Etienne Pallier   Très Gros Bugfix ...
59
60
            ////'uid' => 'user1_SUPER',
            'uid' => 'u1SUPER',
bc14f1eb   Etienne Pallier   LDAP CACHED v3
61
62
            'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
            //'email' => 'testa@test.fr',
512ca314   Etienne Pallier   Très Gros Bugfix ...
63
64
            /////'mail' => 'user1_SUPER@test.fr',
            'mail' => 'user1.SUPER@test.fr',
bc14f1eb   Etienne Pallier   LDAP CACHED v3
65
66
        ],
        
07e4c3fb   Etienne Pallier   v4.108.0-3.7.9 - ...
67
        /*
bc14f1eb   Etienne Pallier   LDAP CACHED v3
68
        // Adminplus
512ca314   Etienne Pallier   Très Gros Bugfix ...
69
		[
bcc25a64   Etienne Pallier   Tests génériques ...
70
    		//'id' => 2,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
71
72
    		//'sn' => 'test3 test4',
		    //'sn' => 'user2 ADMINP',
07e4c3fb   Etienne Pallier   v4.108.0-3.7.9 - ...
73
		    /S
bc14f1eb   Etienne Pallier   LDAP CACHED v3
74
75
		    'sn' => 'user2',
    		'givenname' => 'ADMINP',
07e4c3fb   Etienne Pallier   v4.108.0-3.7.9 - ...
76
    		S/
512ca314   Etienne Pallier   Très Gros Bugfix ...
77
78
79
80
81
82
83
84
85
		    'sn' => 'ADMINP',
		    'givenname' => 'user2',
		    //'uid' => 'testz',
    		////'uid' => 'user2_ADMINPLUS',
		    'uid' => 'u2ADMINP',
		    'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
    		/////'mail' => 'testz@test.fr',
		    'mail' => 'user2.ADMINP@test.fr',
		],
07e4c3fb   Etienne Pallier   v4.108.0-3.7.9 - ...
86
		*/
bc14f1eb   Etienne Pallier   LDAP CACHED v3
87
88
        
        // Admin
512ca314   Etienne Pallier   Très Gros Bugfix ...
89
		[
07e4c3fb   Etienne Pallier   v4.108.0-3.7.9 - ...
90
    		'id' => 3,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
91
92
    		//'sn' => 'test5 test6',
		    //'sn' => 'user3 ADMIN',
512ca314   Etienne Pallier   Très Gros Bugfix ...
93
		    /*
bc14f1eb   Etienne Pallier   LDAP CACHED v3
94
95
		    'sn' => 'user3',
		    'givenname' => 'ADMIN',
512ca314   Etienne Pallier   Très Gros Bugfix ...
96
97
98
99
100
101
102
103
104
105
		    */
		    'sn' => 'ADMIN',
		    'givenname' => 'user3',
		    //'uid' => 'teste',
    		////'uid' => 'user3_ADMIN',
		    'uid' => 'u3ADMIN',
		    'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
		    ////'mail' => 'teste@test.fr',
		    'mail' => 'user3.ADMIN@test.fr',
		],
bc14f1eb   Etienne Pallier   LDAP CACHED v3
106
107
        
        // Responsable
512ca314   Etienne Pallier   Très Gros Bugfix ...
108
		[
07e4c3fb   Etienne Pallier   v4.108.0-3.7.9 - ...
109
    		'id' => 4,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
110
111
	        //'sn' => 'test7 test8',
		    //'sn' => 'user4 RESP',
512ca314   Etienne Pallier   Très Gros Bugfix ...
112
		    /*
bc14f1eb   Etienne Pallier   LDAP CACHED v3
113
114
		    'sn' => 'user4',
		    'givenname' => 'RESP',
512ca314   Etienne Pallier   Très Gros Bugfix ...
115
116
117
118
119
120
121
122
123
124
    		*/
		    'sn' => 'RESP',
		    'givenname' => 'user4',
		    //'uid' => 'testr',
    		/////'uid' => 'user4_RESP',
		    'uid' => 'u4RESP',
		    'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
		    ////'mail' => 'testr@test.fr',
		    'mail' => 'user4.RESP@test.fr',
		],
bc14f1eb   Etienne Pallier   LDAP CACHED v3
125
126
        
        // User (simple user, authentified, but no priviledge)
512ca314   Etienne Pallier   Très Gros Bugfix ...
127
		[
07e4c3fb   Etienne Pallier   v4.108.0-3.7.9 - ...
128
    		'id' => 5,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
129
130
    		//'sn' => 'test9 test0',
		    //'sn' => 'user5 USER',
512ca314   Etienne Pallier   Très Gros Bugfix ...
131
		    /*
bc14f1eb   Etienne Pallier   LDAP CACHED v3
132
133
		    'sn' => 'user5',
		    'givenname' => 'USER',
512ca314   Etienne Pallier   Très Gros Bugfix ...
134
135
136
137
138
139
140
141
142
143
		    */
		    'sn' => 'USER',
    	    'givenname' => 'user5',
		    //'uid' => 'testt',
    		////'uid' => 'user5_USER',
		    'uid' => 'u5USER',
		    'userpassword' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
		    /////'mail' => 'testt@test.fr',
		    'mail' => 'user5.USER@test.fr',
		],
bc14f1eb   Etienne Pallier   LDAP CACHED v3
144
145
    ];
}