Blame view

tests/Fixture/FakeldapusersFixture.php 3.56 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
52
53
54
55
56
57
58
59
60
61
62
            //'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
    		[
bcc25a64   Etienne Pallier   Tests génériques ...
63
    		//'id' => 2,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
64
65
66
67
68
69
70
71
72
73
74
75
    		//'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
    		[
bcc25a64   Etienne Pallier   Tests génériques ...
76
    		//'id' => 3,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
77
78
79
80
81
82
83
84
85
86
87
88
    		//'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
    		[
bcc25a64   Etienne Pallier   Tests génériques ...
89
    		//'id' => 4,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
90
91
92
93
94
95
96
97
98
99
100
101
	        //'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)
    		[
bcc25a64   Etienne Pallier   Tests génériques ...
102
    		//'id' => 5,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
103
104
105
106
107
108
109
110
111
112
113
    		//'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',
    		],
    ];
}