Blame view

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