Blame view

tests/Fixture/UsersFixture.php 5.29 KB
64fba1a2   Alexandre   Base du projet : ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
namespace App\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

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

    /**
     * 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],
e1f6c5b7   Alexandre   Version: 2.3.0.0
22
        'username' => ['type' => 'string', 'length' => 26, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
64fba1a2   Alexandre   Base du projet : ...
23
24
25
26
        '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],
3367192b   Alexandre   Version: 2.4.3.13
27
    	'groupe_thematique_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
32b504ee   Alexis Proust   mise a jour test
28
		'sur_categorie_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
64fba1a2   Alexandre   Base du projet : ...
29
30
        '_indexes' => [
            'fk_users_groupes_travails1' => ['type' => 'index', 'columns' => ['groupes_metier_id'], 'length' => []],
3367192b   Alexandre   Version: 2.4.3.13
31
        	'fk_users_groupe_thematique_id' => ['type' => 'index', 'columns' => ['groupe_thematique_id'], 'length' => []],
32b504ee   Alexis Proust   mise a jour test
32
			'fk_users_sur_categorie_id' => ['type' => 'index', 'columns' => ['sur_categorie_id'], 'length' => []],
64fba1a2   Alexandre   Base du projet : ...
33
34
35
        ],
        '_constraints' => [
            'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
e1f6c5b7   Alexandre   Version: 2.3.0.0
36
            'login_UNIQUE' => ['type' => 'unique', 'columns' => ['username'], 'length' => []],
64fba1a2   Alexandre   Base du projet : ...
37
            'fk_users_groupes_travails1' => ['type' => 'foreign', 'columns' => ['groupes_metier_id'], 'references' => ['groupes_metiers', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
3367192b   Alexandre   Version: 2.4.3.13
38
        	'fk_users_groupe_thematique_id' => ['type' => 'foreign', 'columns' => ['groupe_thematique_id'], 'references' => ['groupes_thematiques', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
32b504ee   Alexis Proust   mise a jour test
39
40
			'fk_users_sur_categorie_id' => ['type' => 'foreign', 'columns' => ['sur_categorie_id'], 'references' => ['sur_categories', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
		],
64fba1a2   Alexandre   Base du projet : ...
41
42
43
44
45
46
47
48
49
50
51
52
53
        '_options' => [
            'engine' => 'InnoDB',
            'collation' => 'latin1_swedish_ci'
        ],
    ];
    // @codingStandardsIgnoreEnd

    /**
     * Records
     *
     * @var array
     */
    public $records = [
8cbe319a   Etienne Pallier   Amelioration des ...
54
55
        
        // Superadmin
64fba1a2   Alexandre   Base du projet : ...
56
57
        [
            'id' => 1,
4d55cf0b   Etienne Pallier   NEW ACL centralis...
58
            // Nom Prénom
8cbe319a   Etienne Pallier   Amelioration des ...
59
            'nom' => 'user1 SUPER',
4d55cf0b   Etienne Pallier   NEW ACL centralis...
60
            //'nom' => 'test1 test2',
164ad0a0   Etienne Pallier   Grosse ameliorati...
61
            //'username' => 'testa',
8cbe319a   Etienne Pallier   Amelioration des ...
62
            'username' => 'user1_SUPER',
771aa727   Alexandre   Version: 2.3.2.0
63
            'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
164ad0a0   Etienne Pallier   Grosse ameliorati...
64
65
            //'email' => 'testa@test.fr',
            'email' => 'user1_SUPER@test.fr',
e1f6c5b7   Alexandre   Version: 2.3.0.0
66
            'role' => 'Super Administrateur',
9cfb4997   Alexandre   Version: 2.4.3.10
67
            'groupes_metier_id' => 1,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
68
            'groupe_thematique_id' => 1
64fba1a2   Alexandre   Base du projet : ...
69
        ],
8cbe319a   Etienne Pallier   Amelioration des ...
70
71
        
        // Adminplus
bc6fe47e   Etienne Pallier   Version: 3.7.9.28
72
		[
04a6b875   Alexandre   Version: 2.4.2.0
73
    		'id' => 2,
b711c664   Etienne Pallier   encore des amelio...
74
75
    		//'nom' => 'test3 test4',
    		'nom' => 'user2 ADMINP',
8cbe319a   Etienne Pallier   Amelioration des ...
76
77
    		//'username' => 'testz',
    		'username' => 'user2_ADMINPLUS',
04a6b875   Alexandre   Version: 2.4.2.0
78
79
80
    		'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
    		'email' => 'testz@test.fr',
    		'role' => 'Administration Plus',
9cfb4997   Alexandre   Version: 2.4.3.10
81
    		'groupes_metier_id' => 1,
3367192b   Alexandre   Version: 2.4.3.13
82
    		'groupe_thematique_id' => 1
bc6fe47e   Etienne Pallier   Version: 3.7.9.28
83
		],
8cbe319a   Etienne Pallier   Amelioration des ...
84
85
        
        // Admin
bc6fe47e   Etienne Pallier   Version: 3.7.9.28
86
		[
04a6b875   Alexandre   Version: 2.4.2.0
87
    		'id' => 3,
b711c664   Etienne Pallier   encore des amelio...
88
89
    		//'nom' => 'test5 test6',
    		'nom' => 'user3 ADMIN',
8cbe319a   Etienne Pallier   Amelioration des ...
90
91
    		//'username' => 'teste',
    		'username' => 'user3_ADMIN',
04a6b875   Alexandre   Version: 2.4.2.0
92
93
94
    		'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
    		'email' => 'teste@test.fr',
    		'role' => 'Administration',
9cfb4997   Alexandre   Version: 2.4.3.10
95
    		'groupes_metier_id' => 1,
3367192b   Alexandre   Version: 2.4.3.13
96
    		'groupe_thematique_id' => 1
bc6fe47e   Etienne Pallier   Version: 3.7.9.28
97
		],
8cbe319a   Etienne Pallier   Amelioration des ...
98
99
        
        // Responsable
bc6fe47e   Etienne Pallier   Version: 3.7.9.28
100
		[
04a6b875   Alexandre   Version: 2.4.2.0
101
    		'id' => 4,
bc14f1eb   Etienne Pallier   LDAP CACHED v3
102
103
	        //'nom' => 'test7 test8',
	        'nom' => 'user4 RESP',
8cbe319a   Etienne Pallier   Amelioration des ...
104
105
    		//'username' => 'testr',
    		'username' => 'user4_RESP',
04a6b875   Alexandre   Version: 2.4.2.0
106
107
108
    		'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
    		'email' => 'testr@test.fr',
    		'role' => 'Responsable',
9cfb4997   Alexandre   Version: 2.4.3.10
109
    		'groupes_metier_id' => 1,
3367192b   Alexandre   Version: 2.4.3.13
110
    		'groupe_thematique_id' => 1
bc6fe47e   Etienne Pallier   Version: 3.7.9.28
111
		],
8cbe319a   Etienne Pallier   Amelioration des ...
112
113
        
        // User (simple user, authentified, but no priviledge)
bc6fe47e   Etienne Pallier   Version: 3.7.9.28
114
		[
04a6b875   Alexandre   Version: 2.4.2.0
115
    		'id' => 5,
b711c664   Etienne Pallier   encore des amelio...
116
117
    		//'nom' => 'test9 test0',
    		'nom' => 'user5 USER',
8cbe319a   Etienne Pallier   Amelioration des ...
118
119
    		//'username' => 'testt',
    		'username' => 'user5_USER',
04a6b875   Alexandre   Version: 2.4.2.0
120
121
122
    		'password' => '$2y$10$VtYdA8Evkc.K.VpvqmF9wui5hc9ep19f8ukWBeFBIlunXSHPqw.K2',
    		'email' => 'testt@test.fr',
    		'role' => 'Utilisateur',
9cfb4997   Alexandre   Version: 2.4.3.10
123
    		'groupes_metier_id' => 1,
3367192b   Alexandre   Version: 2.4.3.13
124
    		'groupe_thematique_id' => 1
bc6fe47e   Etienne Pallier   Version: 3.7.9.28
125
126
		],
        
64fba1a2   Alexandre   Base du projet : ...
127
128
    ];
}