Blame view

tests/Fixture/FakeldapusersFixture.php 4.27 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
67
        ],
        
        // Adminplus
512ca314   Etienne Pallier   Très Gros Bugfix ...
68
		[
bcc25a64   Etienne Pallier   Tests génériques ...
69
    		//'id' => 2,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
70
71
    		//'sn' => 'test3 test4',
		    //'sn' => 'user2 ADMINP',
512ca314   Etienne Pallier   Très Gros Bugfix ...
72
		    /*
bc14f1eb   Etienne Pallier   LDAP CACHED v3
73
74
		    'sn' => 'user2',
    		'givenname' => 'ADMINP',
512ca314   Etienne Pallier   Très Gros Bugfix ...
75
76
77
78
79
80
81
82
83
84
    		*/
		    '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',
		],
bc14f1eb   Etienne Pallier   LDAP CACHED v3
85
86
        
        // Admin
512ca314   Etienne Pallier   Très Gros Bugfix ...
87
		[
bcc25a64   Etienne Pallier   Tests génériques ...
88
    		//'id' => 3,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
89
90
    		//'sn' => 'test5 test6',
		    //'sn' => 'user3 ADMIN',
512ca314   Etienne Pallier   Très Gros Bugfix ...
91
		    /*
bc14f1eb   Etienne Pallier   LDAP CACHED v3
92
93
		    'sn' => 'user3',
		    'givenname' => 'ADMIN',
512ca314   Etienne Pallier   Très Gros Bugfix ...
94
95
96
97
98
99
100
101
102
103
		    */
		    '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
104
105
        
        // Responsable
512ca314   Etienne Pallier   Très Gros Bugfix ...
106
		[
bcc25a64   Etienne Pallier   Tests génériques ...
107
    		//'id' => 4,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
108
109
	        //'sn' => 'test7 test8',
		    //'sn' => 'user4 RESP',
512ca314   Etienne Pallier   Très Gros Bugfix ...
110
		    /*
bc14f1eb   Etienne Pallier   LDAP CACHED v3
111
112
		    'sn' => 'user4',
		    'givenname' => 'RESP',
512ca314   Etienne Pallier   Très Gros Bugfix ...
113
114
115
116
117
118
119
120
121
122
    		*/
		    '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
123
124
        
        // User (simple user, authentified, but no priviledge)
512ca314   Etienne Pallier   Très Gros Bugfix ...
125
		[
bcc25a64   Etienne Pallier   Tests génériques ...
126
    		//'id' => 5,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
127
128
    		//'sn' => 'test9 test0',
		    //'sn' => 'user5 USER',
512ca314   Etienne Pallier   Très Gros Bugfix ...
129
		    /*
bc14f1eb   Etienne Pallier   LDAP CACHED v3
130
131
		    'sn' => 'user5',
		    'givenname' => 'USER',
512ca314   Etienne Pallier   Très Gros Bugfix ...
132
133
134
135
136
137
138
139
140
141
		    */
		    '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
142
143
    ];
}