Blame view

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