Commit 183ce5543e82d1818874cf4f7ada845ce73f98d8
1 parent
9212589e
Exists in
master
and in
3 other branches
Ajout de test, suppession test générer par défaut mais non implémenter
Ajout scrollbar Bugfixes
Showing
38 changed files
with
459 additions
and
1933 deletions
Show diff stats
src/Controller/EmpruntsController.php
... | ... | @@ -27,6 +27,8 @@ class EmpruntsController extends AppController |
27 | 27 | |
28 | 28 | $sites = TableRegistry::get('Sites')->find('list', [ 'keyField' => 'id', 'valueField' => 'nom'])->toArray(); |
29 | 29 | |
30 | + $this->set('nbEmprunts', $this->Emprunts->find('all')->count()); | |
31 | + | |
30 | 32 | $this->set(compact('emprunts', 'sites')); |
31 | 33 | $this->set('_serialize', ['emprunts']); |
32 | 34 | } | ... | ... |
src/Controller/MaterielsController.php
... | ... | @@ -191,7 +191,7 @@ class MaterielsController extends AppController |
191 | 191 | $this->set(compact('s_sur_categories', 's_categories', 's_sous_categories', 's_groupes_thematiques', 's_groupes_metiers', 's_organismes')); |
192 | 192 | |
193 | 193 | // some data POSTED (au moins le champ de recherche generale) ? |
194 | - if ( isset($this->request->data['s_all']) || isset($this->request->data['s_all_2']) || isset($this->request->data['designation'])) { | |
194 | + if ( isset($this->request->data['s_all']) || isset($this->request->data['s_all_2']) || isset($this->request->data['s_designation'])) { | |
195 | 195 | $generalFieldConditions = NULL; |
196 | 196 | // if general field set (s_all), then set general request for it |
197 | 197 | if (isset($this->request->data['s_all'])) { | ... | ... |
src/Controller/SuivisController.php
... | ... | @@ -24,6 +24,8 @@ class SuivisController extends AppController |
24 | 24 | ]; |
25 | 25 | $suivis = $this->paginate($this->Suivis); |
26 | 26 | |
27 | + $this->set('nbSuivis', $this->Suivis->find('all')->count()); | |
28 | + | |
27 | 29 | $this->set(compact('suivis')); |
28 | 30 | $this->set('_serialize', ['suivis']); |
29 | 31 | } | ... | ... |
src/Template/Emprunts/index.ctp
src/Template/Layout/default.ctp
... | ... | @@ -61,7 +61,7 @@ $cakeDescription = 'Labinvent 2.0'; |
61 | 61 | </div> |
62 | 62 | |
63 | 63 | |
64 | - <div class="content"> | |
64 | + <div id="content"> | |
65 | 65 | <?= $this->Flash->render()?> |
66 | 66 | <?= $this->Flash->render('auth') ?> |
67 | 67 | <?= $this->fetch('content')?> |
... | ... | @@ -93,7 +93,7 @@ $cakeDescription = 'Labinvent 2.0'; |
93 | 93 | </i></td> |
94 | 94 | <td id="version"> |
95 | 95 | <!-- VERSION M.m.f.b (version (M)ajeure, version (m)ineure, numero de nouvelle (f)onctionnalite, numero de (b)ugfix) --> |
96 | - <font color="black">VERSION 2.0.5.1 (09/05/2016)</font> | |
96 | + <font color="black">VERSION 2.1.0.2 (11/05/2016)</font> | |
97 | 97 | </td> |
98 | 98 | </tr> |
99 | 99 | </table> | ... | ... |
src/Template/Suivis/index.ctp
tests/Fixture/EmpruntsFixture.php
... | ... | @@ -60,7 +60,7 @@ class EmpruntsFixture extends TestFixture |
60 | 60 | 'date_retour_emprunt' => '2016-04-19', |
61 | 61 | 'emprunt_interne' => 1, |
62 | 62 | 'laboratoire' => 'Lorem ipsum dolor sit amet', |
63 | - 'e_lieu_stockage' => 'Lorem ipsum dolor sit amet', | |
63 | + 'e_lieu_stockage' => 1, | |
64 | 64 | 'e_lieu_detail' => 'Lorem ipsum dolor sit amet', |
65 | 65 | 'nom_emprunteur' => 'Lorem ipsum dolor sit amet', |
66 | 66 | 'email_emprunteur' => 'Lorem ipsum dolor sit amet', |
... | ... | @@ -71,5 +71,23 @@ class EmpruntsFixture extends TestFixture |
71 | 71 | 'created' => '2016-04-19 09:09:26', |
72 | 72 | 'modified' => '2016-04-19 09:09:26' |
73 | 73 | ], |
74 | + [ | |
75 | + 'id' => 2, | |
76 | + 'materiel_id' => 1, | |
77 | + 'date_emprunt' => '2016-04-19', | |
78 | + 'date_retour_emprunt' => '2016-04-19', | |
79 | + 'emprunt_interne' => 0, | |
80 | + 'laboratoire' => 'Lorem ipsum dolor sit amet', | |
81 | + 'e_lieu_stockage' => 1, | |
82 | + 'e_lieu_detail' => 'Lorem ipsum dolor sit amet', | |
83 | + 'nom_emprunteur' => 'Lorem ipsum dolor sit amet', | |
84 | + 'email_emprunteur' => 'Lorem ipsum dolor sit amet', | |
85 | + 'tel' => 'Lorem ipsum dolor ', | |
86 | + 'commentaire' => 'TEST VIEW EMPRUNT VALIDE', | |
87 | + 'nom_createur' => 'Lorem ipsum dolor sit amet', | |
88 | + 'nom_modificateur' => 'Lorem ipsum dolor sit amet', | |
89 | + 'created' => '2016-04-19 09:09:26', | |
90 | + 'modified' => '2016-04-19 09:09:26' | |
91 | + ], | |
74 | 92 | ]; |
75 | 93 | } | ... | ... |
tests/Fixture/MaterielsFixture.php
... | ... | @@ -86,7 +86,7 @@ class MaterielsFixture extends TestFixture |
86 | 86 | public $records = [ |
87 | 87 | [ |
88 | 88 | 'id' => 1, |
89 | - 'designation' => 'Test 1', | |
89 | + 'designation' => '1 tseT', | |
90 | 90 | 'sur_categorie_id' => 1, |
91 | 91 | 'categorie_id' => 1, |
92 | 92 | 'sous_categorie_id' => 1, |
... | ... | @@ -95,9 +95,9 @@ class MaterielsFixture extends TestFixture |
95 | 95 | 'materiel_administratif' => 1, |
96 | 96 | 'materiel_technique' => 1, |
97 | 97 | 'status' => 'CREATED', |
98 | - 'date_acquisition' => '2016-04-19', | |
98 | + 'date_acquisition' => '2014-04-19', | |
99 | 99 | 'fournisseur' => 'Lorem ipsum dolor sit amet', |
100 | - 'prix_ht' => 1, | |
100 | + 'prix_ht' => 25, | |
101 | 101 | 'eotp' => 'Lorem ipsum dolor sit amet', |
102 | 102 | 'numero_commande' => 'Lorem ipsum dolor sit amet', |
103 | 103 | 'code_comptable' => 'Lorem ipsum dolor sit amet', |
... | ... | @@ -131,9 +131,9 @@ class MaterielsFixture extends TestFixture |
131 | 131 | 'materiel_administratif' => 1, |
132 | 132 | 'materiel_technique' => 1, |
133 | 133 | 'status' => 'CREATED', |
134 | - 'date_acquisition' => '2016-04-19', | |
134 | + 'date_acquisition' => '2015-04-19', | |
135 | 135 | 'fournisseur' => 'Lorem ipsum dolor sit amet', |
136 | - 'prix_ht' => 1, | |
136 | + 'prix_ht' => 50, | |
137 | 137 | 'eotp' => 'Lorem ipsum dolor sit amet', |
138 | 138 | 'numero_commande' => 'Lorem ipsum dolor sit amet', |
139 | 139 | 'code_comptable' => 'Lorem ipsum dolor sit amet', |
... | ... | @@ -167,9 +167,9 @@ class MaterielsFixture extends TestFixture |
167 | 167 | 'materiel_administratif' => 1, |
168 | 168 | 'materiel_technique' => 1, |
169 | 169 | 'status' => 'VALIDATED', |
170 | - 'date_acquisition' => '2016-04-19', | |
170 | + 'date_acquisition' => '2016-05-11', | |
171 | 171 | 'fournisseur' => 'Lorem ipsum dolor sit amet', |
172 | - 'prix_ht' => 1, | |
172 | + 'prix_ht' => 75, | |
173 | 173 | 'eotp' => 'Lorem ipsum dolor sit amet', |
174 | 174 | 'numero_commande' => 'Lorem ipsum dolor sit amet', |
175 | 175 | 'code_comptable' => 'Lorem ipsum dolor sit amet', | ... | ... |
tests/Fixture/SuivisFixture.php
... | ... | @@ -63,5 +63,19 @@ class SuivisFixture extends TestFixture |
63 | 63 | 'created' => '2016-04-19 09:09:28', |
64 | 64 | 'modified' => '2016-04-19 09:09:28' |
65 | 65 | ], |
66 | + [ | |
67 | + 'id' => 2, | |
68 | + 'materiel_id' => 1, | |
69 | + 'date_controle' => '2016-04-19', | |
70 | + 'date_prochain_controle' => '2016-04-19', | |
71 | + 'type_intervention' => 'Lorem ipsum dolor sit amet', | |
72 | + 'organisme' => 'Lorem ipsum dolor sit amet', | |
73 | + 'frequence' => 1, | |
74 | + 'commentaire' => 'TEST VIEW SUIVI VALIDE', | |
75 | + 'nom_createur' => 'Lorem ipsum dolor sit amet', | |
76 | + 'nom_modificateur' => 'Lorem ipsum dolor sit amet', | |
77 | + 'created' => '2016-04-19 09:09:28', | |
78 | + 'modified' => '2016-04-19 09:09:28' | |
79 | + ], | |
66 | 80 | ]; |
67 | 81 | } | ... | ... |
tests/TestCase/Controller/CategoriesControllerTest.php deleted
... | ... | @@ -1,72 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\CategoriesController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\CategoriesController Test Case | |
9 | - */ | |
10 | -class CategoriesControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.categories', | |
20 | - 'app.sur_categories' | |
21 | - ]; | |
22 | - | |
23 | - /** | |
24 | - * Test index method | |
25 | - * | |
26 | - * @return void | |
27 | - */ | |
28 | - public function testIndex() | |
29 | - { | |
30 | - $this->markTestIncomplete('Not implemented yet.'); | |
31 | - } | |
32 | - | |
33 | - /** | |
34 | - * Test view method | |
35 | - * | |
36 | - * @return void | |
37 | - */ | |
38 | - public function testView() | |
39 | - { | |
40 | - $this->markTestIncomplete('Not implemented yet.'); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * Test add method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function testAdd() | |
49 | - { | |
50 | - $this->markTestIncomplete('Not implemented yet.'); | |
51 | - } | |
52 | - | |
53 | - /** | |
54 | - * Test edit method | |
55 | - * | |
56 | - * @return void | |
57 | - */ | |
58 | - public function testEdit() | |
59 | - { | |
60 | - $this->markTestIncomplete('Not implemented yet.'); | |
61 | - } | |
62 | - | |
63 | - /** | |
64 | - * Test delete method | |
65 | - * | |
66 | - * @return void | |
67 | - */ | |
68 | - public function testDelete() | |
69 | - { | |
70 | - $this->markTestIncomplete('Not implemented yet.'); | |
71 | - } | |
72 | -} |
tests/TestCase/Controller/ConfigurationsControllerTest.php deleted
... | ... | @@ -1,71 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\ConfigurationsController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\ConfigurationsController Test Case | |
9 | - */ | |
10 | -class ConfigurationsControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.configurations' | |
20 | - ]; | |
21 | - | |
22 | - /** | |
23 | - * Test index method | |
24 | - * | |
25 | - * @return void | |
26 | - */ | |
27 | - public function testIndex() | |
28 | - { | |
29 | - $this->markTestIncomplete('Not implemented yet.'); | |
30 | - } | |
31 | - | |
32 | - /** | |
33 | - * Test view method | |
34 | - * | |
35 | - * @return void | |
36 | - */ | |
37 | - public function testView() | |
38 | - { | |
39 | - $this->markTestIncomplete('Not implemented yet.'); | |
40 | - } | |
41 | - | |
42 | - /** | |
43 | - * Test add method | |
44 | - * | |
45 | - * @return void | |
46 | - */ | |
47 | - public function testAdd() | |
48 | - { | |
49 | - $this->markTestIncomplete('Not implemented yet.'); | |
50 | - } | |
51 | - | |
52 | - /** | |
53 | - * Test edit method | |
54 | - * | |
55 | - * @return void | |
56 | - */ | |
57 | - public function testEdit() | |
58 | - { | |
59 | - $this->markTestIncomplete('Not implemented yet.'); | |
60 | - } | |
61 | - | |
62 | - /** | |
63 | - * Test delete method | |
64 | - * | |
65 | - * @return void | |
66 | - */ | |
67 | - public function testDelete() | |
68 | - { | |
69 | - $this->markTestIncomplete('Not implemented yet.'); | |
70 | - } | |
71 | -} |
tests/TestCase/Controller/DocumentsControllerTest.php deleted
... | ... | @@ -1,73 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\DocumentsController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\DocumentsController Test Case | |
9 | - */ | |
10 | -class DocumentsControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.documents', | |
20 | - 'app.materiels', | |
21 | - 'app.suivis' | |
22 | - ]; | |
23 | - | |
24 | - /** | |
25 | - * Test index method | |
26 | - * | |
27 | - * @return void | |
28 | - */ | |
29 | - public function testIndex() | |
30 | - { | |
31 | - $this->markTestIncomplete('Not implemented yet.'); | |
32 | - } | |
33 | - | |
34 | - /** | |
35 | - * Test view method | |
36 | - * | |
37 | - * @return void | |
38 | - */ | |
39 | - public function testView() | |
40 | - { | |
41 | - $this->markTestIncomplete('Not implemented yet.'); | |
42 | - } | |
43 | - | |
44 | - /** | |
45 | - * Test add method | |
46 | - * | |
47 | - * @return void | |
48 | - */ | |
49 | - public function testAdd() | |
50 | - { | |
51 | - $this->markTestIncomplete('Not implemented yet.'); | |
52 | - } | |
53 | - | |
54 | - /** | |
55 | - * Test edit method | |
56 | - * | |
57 | - * @return void | |
58 | - */ | |
59 | - public function testEdit() | |
60 | - { | |
61 | - $this->markTestIncomplete('Not implemented yet.'); | |
62 | - } | |
63 | - | |
64 | - /** | |
65 | - * Test delete method | |
66 | - * | |
67 | - * @return void | |
68 | - */ | |
69 | - public function testDelete() | |
70 | - { | |
71 | - $this->markTestIncomplete('Not implemented yet.'); | |
72 | - } | |
73 | -} |
tests/TestCase/Controller/EmpruntsControllerTest.php
... | ... | @@ -27,9 +27,25 @@ class EmpruntsControllerTest extends IntegrationTestCase |
27 | 27 | 'app.organismes', |
28 | 28 | 'app.sites', |
29 | 29 | 'app.documents', |
30 | - 'app.suivis' | |
30 | + 'app.suivis', | |
31 | + 'app.configurations' | |
31 | 32 | ]; |
32 | 33 | |
34 | + | |
35 | + public function authUser() { | |
36 | + $user = [ | |
37 | + 'Auth' => [ | |
38 | + 'User' => [ | |
39 | + 'id' => 1, | |
40 | + 'username' => 'testing', | |
41 | + 'password' => 'test', | |
42 | + 'role' => 'Super Administrateur' | |
43 | + ] | |
44 | + ] | |
45 | + ]; | |
46 | + $this->session($user); | |
47 | + } | |
48 | + | |
33 | 49 | /** |
34 | 50 | * Test index method |
35 | 51 | * |
... | ... | @@ -37,7 +53,14 @@ class EmpruntsControllerTest extends IntegrationTestCase |
37 | 53 | */ |
38 | 54 | public function testIndex() |
39 | 55 | { |
40 | - $this->markTestIncomplete('Not implemented yet.'); | |
56 | + $this->authUser(); | |
57 | + | |
58 | + //1) On doit pouvoir accéder à la page une fois authentifié | |
59 | + $this->get('/emprunts/index'); | |
60 | + $this->assertNoRedirect("Authentifier mais redirection vers /users/login."); | |
61 | + | |
62 | + //2) On doit avoir 3 matériels | |
63 | + $this->assertResponseContains("Liste des emprunts (2)", "Le nombre d'emprunt renvoyé est incorrect."); | |
41 | 64 | } |
42 | 65 | |
43 | 66 | /** |
... | ... | @@ -47,7 +70,10 @@ class EmpruntsControllerTest extends IntegrationTestCase |
47 | 70 | */ |
48 | 71 | public function testView() |
49 | 72 | { |
50 | - $this->markTestIncomplete('Not implemented yet.'); | |
73 | + $this->authUser(); | |
74 | + | |
75 | + $this->get('/emprunts/view/2'); | |
76 | + $this->assertResponseContains("TEST VIEW EMPRUNT VALIDE", "L'emprunt retourné n'est pas celui demandé."); | |
51 | 77 | } |
52 | 78 | |
53 | 79 | /** |
... | ... | @@ -57,7 +83,31 @@ class EmpruntsControllerTest extends IntegrationTestCase |
57 | 83 | */ |
58 | 84 | public function testAdd() |
59 | 85 | { |
60 | - $this->markTestIncomplete('Not implemented yet.'); | |
86 | + $this->authUser(); | |
87 | + | |
88 | + $data = [ | |
89 | + 'id' => 5, | |
90 | + 'materiel_id' => 1, | |
91 | + 'date_emprunt' => '2016-04-19', | |
92 | + 'date_retour_emprunt' => '2016-04-19', | |
93 | + 'emprunt_interne' => 0, | |
94 | + 'laboratoire' => 'Lorem ipsum dolor sit amet', | |
95 | + 'e_lieu_stockage' => 1, | |
96 | + 'e_lieu_detail' => 'Lorem ipsum dolor sit amet', | |
97 | + 'nom_emprunteur' => 'Lorem ipsum dolor sit amet', | |
98 | + 'email_emprunteur' => 'Lorem ipsum dolor sit amet', | |
99 | + 'tel' => 'Lorem ipsum dolor ', | |
100 | + 'commentaire' => 'TEST ADD EMPRUNT VALIDE', | |
101 | + 'nom_createur' => 'Lorem ipsum dolor sit amet', | |
102 | + 'nom_modificateur' => 'Lorem ipsum dolor sit amet', | |
103 | + 'created' => '2016-04-19 09:09:26', | |
104 | + 'modified' => '2016-04-19 09:09:26' | |
105 | + ]; | |
106 | + $this->post('/emprunts/add', $data); | |
107 | + | |
108 | + $this->get('/emprunts/index'); | |
109 | + $this->assertResponseContains("Liste des emprunts (3)", "L'emprunt ne s'ajoute pas correctement."); | |
110 | + | |
61 | 111 | } |
62 | 112 | |
63 | 113 | /** |
... | ... | @@ -67,7 +117,29 @@ class EmpruntsControllerTest extends IntegrationTestCase |
67 | 117 | */ |
68 | 118 | public function testEdit() |
69 | 119 | { |
70 | - $this->markTestIncomplete('Not implemented yet.'); | |
120 | + $this->authUser(); | |
121 | + | |
122 | + $data = [ | |
123 | + 'materiel_id' => 1, | |
124 | + 'date_emprunt' => '2016-04-19', | |
125 | + 'date_retour_emprunt' => '2016-04-19', | |
126 | + 'emprunt_interne' => 0, | |
127 | + 'laboratoire' => 'Lorem ipsum dolor sit amet', | |
128 | + 'e_lieu_stockage' => 'Lorem ipsum dolor sit amet', | |
129 | + 'e_lieu_detail' => 'Lorem ipsum dolor sit amet', | |
130 | + 'nom_emprunteur' => 'Lorem ipsum dolor sit amet', | |
131 | + 'email_emprunteur' => 'Lorem ipsum dolor sit amet', | |
132 | + 'tel' => 'Lorem ipsum dolor ', | |
133 | + 'commentaire' => 'TEST EDIT EMPRUNT VALIDE', | |
134 | + 'nom_createur' => 'Lorem ipsum dolor sit amet', | |
135 | + 'nom_modificateur' => 'Lorem ipsum dolor sit amet', | |
136 | + 'created' => '2016-04-19 09:09:26', | |
137 | + 'modified' => '2016-04-19 09:09:26' | |
138 | + ]; | |
139 | + $this->post('/emprunts/edit/1', $data); | |
140 | + $this->get('/emprunts/view/1'); | |
141 | + $this->assertResponseContains("TEST EDIT EMPRUNT VALIDE", "L'emprunt n'a pas était édité correctement"); | |
142 | + | |
71 | 143 | } |
72 | 144 | |
73 | 145 | /** |
... | ... | @@ -77,6 +149,10 @@ class EmpruntsControllerTest extends IntegrationTestCase |
77 | 149 | */ |
78 | 150 | public function testDelete() |
79 | 151 | { |
80 | - $this->markTestIncomplete('Not implemented yet.'); | |
152 | + $this->authUser(); | |
153 | + | |
154 | + $this->post('/emprunts/delete/2'); | |
155 | + $this->get('/emprunts/index'); | |
156 | + $this->assertResponseContains("Liste des emprunts (1)", "L' emprunt n'as pas été supprimé."); | |
81 | 157 | } |
82 | 158 | } | ... | ... |
tests/TestCase/Controller/GroupesMetiersControllerTest.php deleted
... | ... | @@ -1,82 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\GroupesMetiersController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\GroupesMetiersController Test Case | |
9 | - */ | |
10 | -class GroupesMetiersControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.groupes_metiers', | |
20 | - 'app.materiels', | |
21 | - 'app.sur_categories', | |
22 | - 'app.categories', | |
23 | - 'app.sous_categories', | |
24 | - 'app.groupes_thematiques', | |
25 | - 'app.organismes', | |
26 | - 'app.sites', | |
27 | - 'app.documents', | |
28 | - 'app.suivis', | |
29 | - 'app.emprunts', | |
30 | - 'app.users' | |
31 | - ]; | |
32 | - | |
33 | - /** | |
34 | - * Test index method | |
35 | - * | |
36 | - * @return void | |
37 | - */ | |
38 | - public function testIndex() | |
39 | - { | |
40 | - $this->markTestIncomplete('Not implemented yet.'); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * Test view method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function testView() | |
49 | - { | |
50 | - $this->markTestIncomplete('Not implemented yet.'); | |
51 | - } | |
52 | - | |
53 | - /** | |
54 | - * Test add method | |
55 | - * | |
56 | - * @return void | |
57 | - */ | |
58 | - public function testAdd() | |
59 | - { | |
60 | - $this->markTestIncomplete('Not implemented yet.'); | |
61 | - } | |
62 | - | |
63 | - /** | |
64 | - * Test edit method | |
65 | - * | |
66 | - * @return void | |
67 | - */ | |
68 | - public function testEdit() | |
69 | - { | |
70 | - $this->markTestIncomplete('Not implemented yet.'); | |
71 | - } | |
72 | - | |
73 | - /** | |
74 | - * Test delete method | |
75 | - * | |
76 | - * @return void | |
77 | - */ | |
78 | - public function testDelete() | |
79 | - { | |
80 | - $this->markTestIncomplete('Not implemented yet.'); | |
81 | - } | |
82 | -} |
tests/TestCase/Controller/GroupesThematiquesControllerTest.php deleted
... | ... | @@ -1,72 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\GroupesThematiquesController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\GroupesThematiquesController Test Case | |
9 | - */ | |
10 | -class GroupesThematiquesControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.groupes_thematiques', | |
20 | - 'app.materiels' | |
21 | - ]; | |
22 | - | |
23 | - /** | |
24 | - * Test index method | |
25 | - * | |
26 | - * @return void | |
27 | - */ | |
28 | - public function testIndex() | |
29 | - { | |
30 | - $this->markTestIncomplete('Not implemented yet.'); | |
31 | - } | |
32 | - | |
33 | - /** | |
34 | - * Test view method | |
35 | - * | |
36 | - * @return void | |
37 | - */ | |
38 | - public function testView() | |
39 | - { | |
40 | - $this->markTestIncomplete('Not implemented yet.'); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * Test add method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function testAdd() | |
49 | - { | |
50 | - $this->markTestIncomplete('Not implemented yet.'); | |
51 | - } | |
52 | - | |
53 | - /** | |
54 | - * Test edit method | |
55 | - * | |
56 | - * @return void | |
57 | - */ | |
58 | - public function testEdit() | |
59 | - { | |
60 | - $this->markTestIncomplete('Not implemented yet.'); | |
61 | - } | |
62 | - | |
63 | - /** | |
64 | - * Test delete method | |
65 | - * | |
66 | - * @return void | |
67 | - */ | |
68 | - public function testDelete() | |
69 | - { | |
70 | - $this->markTestIncomplete('Not implemented yet.'); | |
71 | - } | |
72 | -} |
tests/TestCase/Controller/MaterielsControllerTest.php
... | ... | @@ -29,7 +29,8 @@ class MaterielsControllerTest extends IntegrationTestCase |
29 | 29 | 'app.documents', |
30 | 30 | 'app.suivis', |
31 | 31 | 'app.emprunts', |
32 | - 'app.configurations' | |
32 | + 'app.configurations', | |
33 | + 'app.type_suivis' | |
33 | 34 | ]; |
34 | 35 | |
35 | 36 | |
... | ... | @@ -70,6 +71,7 @@ class MaterielsControllerTest extends IntegrationTestCase |
70 | 71 | */ |
71 | 72 | public function tearDown() |
72 | 73 | { |
74 | + | |
73 | 75 | unset($this->Materiels); |
74 | 76 | unset($this->Suivis); |
75 | 77 | |
... | ... | @@ -222,16 +224,194 @@ class MaterielsControllerTest extends IntegrationTestCase |
222 | 224 | public function testFind() |
223 | 225 | { |
224 | 226 | $this->authUser(); |
227 | + | |
228 | + $dataSearch = [ | |
229 | + 's_designation' => 'Test', | |
230 | + 's_matostype' => '', | |
231 | + 's_sur_categorie_id' => '', | |
232 | + 's_categorie_id' => '', | |
233 | + 's_sous_categorie_id' => '', | |
234 | + 's_status' => '', | |
235 | + 's_groupes_metier_id' => '', | |
236 | + 's_groupes_thematique_id' => '', | |
237 | + 's_numero_commande' => '', | |
238 | + 's_numero_laboratoire' => '', | |
239 | + 's_organisme_id' => '', | |
240 | + 's_nom_responsable' => '', | |
241 | + 's_numero_inventaire_organisme' => '', | |
242 | + 's_numero_inventaire_old' => '', | |
243 | + 's_date_acquisition' => '', | |
244 | + 's_periode_acquisition1' => '', | |
245 | + 's_periode_acquisition2' => '', | |
246 | + 's_prix_ht' => '', | |
247 | + 's_prix_ht_sup' => '', | |
248 | + 's_prix_ht_inf' => '', | |
249 | + ]; | |
225 | 250 | |
251 | + //Test sans aucun champ | |
226 | 252 | $this->post('/materiels/find'); |
227 | 253 | $this->assertResponseContains("Aucun résultats pour cette recherche.", "Le contenu de la recherche devrait être vide."); |
228 | - | |
229 | - $this->post('/materiels/find', ['designation' => 'Test']); | |
230 | - $this->assertResponseContains("Résultats (3)", "Le nb de materiels dans la recherche est incorrecte."); | |
254 | + | |
255 | + //Test champ générale formulaire | |
256 | + $this->post('/materiels/find', ['s_all' => 'TEST-2016-0002']); | |
257 | + $this->assertResponseContains("Résultats (1)", "Le nb de materiels pour la recherche générale du formulaire est incorrecte."); | |
258 | + | |
259 | + //Test champ générale menu latéral | |
260 | + $this->post('/materiels/find', ['s_all_2' => 'TEST-2016-0002']); | |
261 | + $this->assertResponseContains("Résultats (1)", "Le nb de materiels pour la recherche général du menu latéral est incorrecte."); | |
262 | + | |
263 | + //Test champ designation | |
264 | + $this->post('/materiels/find', $dataSearch); | |
265 | + $this->assertResponseContains("Résultats (2)", "Le nb de materiels pour la recherche par désignation est incorrecte."); | |
266 | + | |
267 | + //Test champ numero_laboratoire | |
268 | + $dataSearch['s_designation'] = ''; | |
269 | + $dataSearch['s_numero_laboratoire'] = 'TEST-2016-0003'; | |
270 | + $this->post('/materiels/find', $dataSearch); | |
271 | + $this->assertResponseContains("Résultats (1)", "Le nb de materiels pour la recherche par numero de laboratoire est incorrecte."); | |
272 | + | |
273 | + //Test champ status | |
274 | + $dataSearch['s_numero_laboratoire'] = ''; | |
275 | + $dataSearch['s_status'] = 'CREATED'; | |
276 | + $this->post('/materiels/find', $dataSearch); | |
277 | + $this->assertResponseContains("Résultats (2)", "Le nb de materiels pour la recherche par statut est incorrecte."); | |
278 | + | |
279 | + //Test champ date_acquisition | |
280 | + $dataSearch['s_status'] = ''; | |
281 | + $dataSearch['s_date_acquisition'] = '2016-05-11'; | |
282 | + $this->post('/materiels/find', $dataSearch); | |
283 | + $this->assertResponseContains("Résultats (1)", "Le nb de materiels pour la recherche par date d'acquisition est incorrecte."); | |
284 | + | |
285 | + //Test champ periode_acquisition1 (debut) | |
286 | + $dataSearch['s_date_acquisition'] = ''; | |
287 | + $dataSearch['s_periode_acquisition1'] = '2015-01-01'; | |
288 | + $this->post('/materiels/find', $dataSearch); | |
289 | + $this->assertResponseContains("Résultats (2)", "Le nb de materiels pour la recherche par debut de periode d'acquisition est incorrecte."); | |
290 | + | |
291 | + //Test champ periode_acquisition1 (debut) && champ periode_acquisition2 (fin) | |
292 | + $dataSearch['s_periode_acquisition2'] = '2016-01-01'; | |
293 | + $this->post('/materiels/find', $dataSearch); | |
294 | + $this->assertResponseContains("Résultats (1)", "Le nb de materiels pour la recherche par intervalle entre la periode d'acquisition (debut) et la periode d'acquisition (fin) est incorrecte."); | |
295 | + | |
296 | + //Test champ periode_acquisition2 (fin) | |
297 | + $dataSearch['s_periode_acquisition1'] = ''; | |
298 | + $this->post('/materiels/find', $dataSearch); | |
299 | + $this->assertResponseContains("Résultats (2)", "Le nb de materiels pour la recherche par fin de periode d'acquisition est incorrecte."); | |
300 | + | |
301 | + //Test champ prix_ht | |
302 | + $dataSearch['s_periode_acquisition2'] = ''; | |
303 | + $dataSearch['s_prix_ht'] = '50'; | |
304 | + $this->post('/materiels/find', $dataSearch); | |
305 | + $this->assertResponseContains("Résultats (1)", "Le nb de materiels pour la recherche par prix ht est incorrecte."); | |
306 | + | |
307 | + //Test champ prix_ht_sup | |
308 | + $dataSearch['s_prix_ht'] = ''; | |
309 | + $dataSearch['s_prix_ht_sup'] = '30'; | |
310 | + $this->post('/materiels/find', $dataSearch); | |
311 | + $this->assertResponseContains("Résultats (2)", "Le nb de materiels pour la recherche par prix ht superieur est incorrecte."); | |
312 | + | |
313 | + //Test champ prix_ht_inf | |
314 | + $dataSearch['s_prix_ht_sup'] = ''; | |
315 | + $dataSearch['s_prix_ht_inf'] = '70'; | |
316 | + $this->post('/materiels/find', $dataSearch); | |
317 | + $this->assertResponseContains("Résultats (2)", "Le nb de materiels pour la recherche par prix ht inferieur est incorrecte."); | |
318 | + | |
319 | + } | |
320 | + | |
321 | + /** | |
322 | + * Test addReadSuivisMateriel | |
323 | + * | |
324 | + * @return void | |
325 | + */ | |
326 | + public function testAddReadSuivisMateriel() | |
327 | + { | |
328 | + $this->authUser(); | |
231 | 329 | |
232 | - $this->put('/materiels/find', ['s_all' => 'TEST-2016-0002']); | |
233 | - $this->assertResponseContains("Résultats (1)", "Le nb de materiels dans la recherche est incorrecte."); | |
330 | + $dataSuivi1 = [ | |
331 | + 'materiel_id' => 1, | |
332 | + 'date_controle' => '2016-04-19', | |
333 | + 'date_prochain_controle' => '2016-04-19', | |
334 | + 'type_intervention' => 'Lorem ipsum dolor sit amet', | |
335 | + 'organisme' => 'Lorem ipsum dolor sit amet', | |
336 | + 'frequence' => 1, | |
337 | + 'commentaire' => 'Lorem ipsum dolor sit amet', | |
338 | + 'nom_createur' => 'Lorem ipsum dolor sit amet', | |
339 | + 'nom_modificateur' => 'Lorem ipsum dolor sit amet', | |
340 | + 'created' => '2016-04-19 09:09:28', | |
341 | + 'modified' => '2016-04-19 09:09:28' | |
342 | + ]; | |
234 | 343 | |
344 | + $dataSuivi2 = [ | |
345 | + 'materiel_id' => 1, | |
346 | + 'date_controle' => '2016-04-19', | |
347 | + 'date_prochain_controle' => '2016-04-19', | |
348 | + 'type_intervention' => 'Lorem ipsum dolor sit amet', | |
349 | + 'organisme' => 'Lorem ipsum dolor sit amet', | |
350 | + 'frequence' => 1, | |
351 | + 'commentaire' => 'Lorem ipsum dolor sit amet', | |
352 | + 'nom_createur' => 'Lorem ipsum dolor sit amet', | |
353 | + 'nom_modificateur' => 'Lorem ipsum dolor sit amet', | |
354 | + 'created' => '2016-04-19 09:09:28', | |
355 | + 'modified' => '2016-04-19 09:09:28' | |
356 | + ]; | |
357 | + $this->post('/suivis/add/1', $dataSuivi1); | |
358 | + $this->post('/suivis/add/1', $dataSuivi2); | |
359 | + | |
360 | + $this->get('/materiels/view/1'); | |
361 | + $this->assertResponseContains("Suivi(s) du matériel (3)", "Le nb de suivi renvoyé pour ce matériel est incorrect."); | |
235 | 362 | } |
363 | + | |
364 | + /** | |
365 | + * Test addReadEmpruntsMateriel | |
366 | + * | |
367 | + * @return void | |
368 | + */ | |
369 | + public function testAddReadEmpruntsMateriel() | |
370 | + { | |
371 | + $this->authUser(); | |
372 | + | |
373 | + $dataEmprunt1 = [ | |
374 | + 'materiel_id' => 1, | |
375 | + 'date_emprunt' => '2016-04-19', | |
376 | + 'date_retour_emprunt' => '2016-04-19', | |
377 | + 'emprunt_interne' => 1, | |
378 | + 'laboratoire' => 'Lorem ipsum dolor sit amet', | |
379 | + 'e_lieu_stockage' => 1, | |
380 | + 'e_lieu_detail' => 'Lorem ipsum dolor sit amet', | |
381 | + 'nom_emprunteur' => 'Lorem ipsum dolor sit amet', | |
382 | + 'email_emprunteur' => 'Lorem ipsum dolor sit amet', | |
383 | + 'tel' => 'Lorem ipsum dolor ', | |
384 | + 'commentaire' => 'Lorem ipsum dolor sit amet', | |
385 | + 'nom_createur' => 'Lorem ipsum dolor sit amet', | |
386 | + 'nom_modificateur' => 'Lorem ipsum dolor sit amet', | |
387 | + 'created' => '2016-04-19 09:09:26', | |
388 | + 'modified' => '2016-04-19 09:09:26' | |
389 | + ]; | |
390 | + | |
391 | + $dataEmprunt2 = [ | |
392 | + 'materiel_id' => 1, | |
393 | + 'date_emprunt' => '2016-04-19', | |
394 | + 'date_retour_emprunt' => '2016-04-19', | |
395 | + 'emprunt_interne' => 0, | |
396 | + 'laboratoire' => 'Lorem ipsum dolor sit amet', | |
397 | + 'e_lieu_stockage' => 1, | |
398 | + 'e_lieu_detail' => 'Lorem ipsum dolor sit amet', | |
399 | + 'nom_emprunteur' => 'Lorem ipsum dolor sit amet', | |
400 | + 'email_emprunteur' => 'Lorem ipsum dolor sit amet', | |
401 | + 'tel' => 'Lorem ipsum dolor ', | |
402 | + 'commentaire' => 'Lorem ipsum dolor sit amet', | |
403 | + 'nom_createur' => 'Lorem ipsum dolor sit amet', | |
404 | + 'nom_modificateur' => 'Lorem ipsum dolor sit amet', | |
405 | + 'created' => '2016-04-19 09:09:26', | |
406 | + 'modified' => '2016-04-19 09:09:26' | |
407 | + ]; | |
408 | + | |
409 | + $this->post('/emprunts/add/1', $dataEmprunt1); | |
410 | + $this->post('/emprunts/add/1', $dataEmprunt2); | |
411 | + | |
412 | + $this->get('/materiels/view/1'); | |
413 | + $this->assertResponseContains("Emprunt(s) du matériel (3)", "Le nb d'emprunt renvoyé pour ce matériel est incorrect."); | |
414 | + } | |
415 | + | |
236 | 416 | |
237 | 417 | } |
238 | 418 | \ No newline at end of file | ... | ... |
tests/TestCase/Controller/OrganismesControllerTest.php deleted
... | ... | @@ -1,72 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\OrganismesController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\OrganismesController Test Case | |
9 | - */ | |
10 | -class OrganismesControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.organismes', | |
20 | - 'app.materiels' | |
21 | - ]; | |
22 | - | |
23 | - /** | |
24 | - * Test index method | |
25 | - * | |
26 | - * @return void | |
27 | - */ | |
28 | - public function testIndex() | |
29 | - { | |
30 | - $this->markTestIncomplete('Not implemented yet.'); | |
31 | - } | |
32 | - | |
33 | - /** | |
34 | - * Test view method | |
35 | - * | |
36 | - * @return void | |
37 | - */ | |
38 | - public function testView() | |
39 | - { | |
40 | - $this->markTestIncomplete('Not implemented yet.'); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * Test add method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function testAdd() | |
49 | - { | |
50 | - $this->markTestIncomplete('Not implemented yet.'); | |
51 | - } | |
52 | - | |
53 | - /** | |
54 | - * Test edit method | |
55 | - * | |
56 | - * @return void | |
57 | - */ | |
58 | - public function testEdit() | |
59 | - { | |
60 | - $this->markTestIncomplete('Not implemented yet.'); | |
61 | - } | |
62 | - | |
63 | - /** | |
64 | - * Test delete method | |
65 | - * | |
66 | - * @return void | |
67 | - */ | |
68 | - public function testDelete() | |
69 | - { | |
70 | - $this->markTestIncomplete('Not implemented yet.'); | |
71 | - } | |
72 | -} |
tests/TestCase/Controller/PagesControllerTest.php
... | ... | @@ -27,7 +27,31 @@ use Cake\View\Exception\MissingTemplateException; |
27 | 27 | */ |
28 | 28 | class PagesControllerTest extends IntegrationTestCase |
29 | 29 | { |
30 | + /** | |
31 | + * Fixtures | |
32 | + * | |
33 | + * @var array | |
34 | + */ | |
35 | + public $fixtures = [ | |
36 | + 'app.configurations', | |
37 | + ]; | |
30 | 38 | |
39 | + public function authUser() { | |
40 | + $user = [ | |
41 | + 'Auth' => [ | |
42 | + 'User' => [ | |
43 | + 'id' => 1, | |
44 | + 'username' => 'testing', | |
45 | + 'password' => 'test', | |
46 | + 'role' => 'Super Administrateur' | |
47 | + ] | |
48 | + ] | |
49 | + ]; | |
50 | + $this->session($user); | |
51 | + } | |
52 | + | |
53 | + | |
54 | + | |
31 | 55 | /** |
32 | 56 | * testDisplay method |
33 | 57 | * |
... | ... | @@ -35,13 +59,12 @@ class PagesControllerTest extends IntegrationTestCase |
35 | 59 | */ |
36 | 60 | public function testDisplay() |
37 | 61 | { |
38 | - /* | |
62 | + $this->authUser(); | |
63 | + | |
39 | 64 | $this->get('/pages/home'); |
40 | 65 | $this->assertResponseOk(); |
41 | - $this->assertResponseContains('CakePHP'); | |
42 | - $this->assertResponseContains('<html>'); | |
43 | - */ | |
44 | - $this->markTestIncomplete('Not implemented yet.'); | |
66 | + $this->assertResponseContains('Accueil'); | |
67 | + | |
45 | 68 | } |
46 | 69 | |
47 | 70 | /** |
... | ... | @@ -51,14 +74,13 @@ class PagesControllerTest extends IntegrationTestCase |
51 | 74 | */ |
52 | 75 | public function testMissingTemplate() |
53 | 76 | { |
54 | - /* | |
77 | + $this->authUser(); | |
78 | + | |
55 | 79 | Configure::write('debug', false); |
56 | 80 | $this->get('/pages/not_existing'); |
57 | 81 | |
58 | - $this->assertResponseError(); | |
59 | 82 | $this->assertResponseContains('Error'); |
60 | - */ | |
61 | - $this->markTestIncomplete('Not implemented yet.'); | |
83 | + | |
62 | 84 | } |
63 | 85 | |
64 | 86 | /** |
... | ... | @@ -68,15 +90,14 @@ class PagesControllerTest extends IntegrationTestCase |
68 | 90 | */ |
69 | 91 | public function testMissingTemplateInDebug() |
70 | 92 | { |
71 | - /* | |
93 | + $this->authUser(); | |
94 | + | |
72 | 95 | Configure::write('debug', true); |
73 | 96 | $this->get('/pages/not_existing'); |
74 | 97 | |
75 | 98 | $this->assertResponseFailure(); |
76 | 99 | $this->assertResponseContains('Missing Template'); |
77 | 100 | $this->assertResponseContains('Stacktrace'); |
78 | - $this->assertResponseContains('not_existing.ctp'); | |
79 | - */ | |
80 | - $this->markTestIncomplete('Not implemented yet.'); | |
101 | + | |
81 | 102 | } |
82 | 103 | } | ... | ... |
tests/TestCase/Controller/SitesControllerTest.php deleted
... | ... | @@ -1,72 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\SitesController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\SitesController Test Case | |
9 | - */ | |
10 | -class SitesControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.sites', | |
20 | - 'app.materiels' | |
21 | - ]; | |
22 | - | |
23 | - /** | |
24 | - * Test index method | |
25 | - * | |
26 | - * @return void | |
27 | - */ | |
28 | - public function testIndex() | |
29 | - { | |
30 | - $this->markTestIncomplete('Not implemented yet.'); | |
31 | - } | |
32 | - | |
33 | - /** | |
34 | - * Test view method | |
35 | - * | |
36 | - * @return void | |
37 | - */ | |
38 | - public function testView() | |
39 | - { | |
40 | - $this->markTestIncomplete('Not implemented yet.'); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * Test add method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function testAdd() | |
49 | - { | |
50 | - $this->markTestIncomplete('Not implemented yet.'); | |
51 | - } | |
52 | - | |
53 | - /** | |
54 | - * Test edit method | |
55 | - * | |
56 | - * @return void | |
57 | - */ | |
58 | - public function testEdit() | |
59 | - { | |
60 | - $this->markTestIncomplete('Not implemented yet.'); | |
61 | - } | |
62 | - | |
63 | - /** | |
64 | - * Test delete method | |
65 | - * | |
66 | - * @return void | |
67 | - */ | |
68 | - public function testDelete() | |
69 | - { | |
70 | - $this->markTestIncomplete('Not implemented yet.'); | |
71 | - } | |
72 | -} |
tests/TestCase/Controller/SousCategoriesControllerTest.php deleted
... | ... | @@ -1,73 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\SousCategoriesController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\SousCategoriesController Test Case | |
9 | - */ | |
10 | -class SousCategoriesControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.sous_categories', | |
20 | - 'app.categories', | |
21 | - 'app.sur_categories' | |
22 | - ]; | |
23 | - | |
24 | - /** | |
25 | - * Test index method | |
26 | - * | |
27 | - * @return void | |
28 | - */ | |
29 | - public function testIndex() | |
30 | - { | |
31 | - $this->markTestIncomplete('Not implemented yet.'); | |
32 | - } | |
33 | - | |
34 | - /** | |
35 | - * Test view method | |
36 | - * | |
37 | - * @return void | |
38 | - */ | |
39 | - public function testView() | |
40 | - { | |
41 | - $this->markTestIncomplete('Not implemented yet.'); | |
42 | - } | |
43 | - | |
44 | - /** | |
45 | - * Test add method | |
46 | - * | |
47 | - * @return void | |
48 | - */ | |
49 | - public function testAdd() | |
50 | - { | |
51 | - $this->markTestIncomplete('Not implemented yet.'); | |
52 | - } | |
53 | - | |
54 | - /** | |
55 | - * Test edit method | |
56 | - * | |
57 | - * @return void | |
58 | - */ | |
59 | - public function testEdit() | |
60 | - { | |
61 | - $this->markTestIncomplete('Not implemented yet.'); | |
62 | - } | |
63 | - | |
64 | - /** | |
65 | - * Test delete method | |
66 | - * | |
67 | - * @return void | |
68 | - */ | |
69 | - public function testDelete() | |
70 | - { | |
71 | - $this->markTestIncomplete('Not implemented yet.'); | |
72 | - } | |
73 | -} |
tests/TestCase/Controller/SuivisControllerTest.php
... | ... | @@ -27,9 +27,25 @@ class SuivisControllerTest extends IntegrationTestCase |
27 | 27 | 'app.organismes', |
28 | 28 | 'app.sites', |
29 | 29 | 'app.documents', |
30 | - 'app.emprunts' | |
30 | + 'app.emprunts', | |
31 | + 'app.configurations' | |
31 | 32 | ]; |
32 | 33 | |
34 | + | |
35 | + public function authUser() { | |
36 | + $user = [ | |
37 | + 'Auth' => [ | |
38 | + 'User' => [ | |
39 | + 'id' => 1, | |
40 | + 'username' => 'testing', | |
41 | + 'password' => 'test', | |
42 | + 'role' => 'Super Administrateur' | |
43 | + ] | |
44 | + ] | |
45 | + ]; | |
46 | + $this->session($user); | |
47 | + } | |
48 | + | |
33 | 49 | /** |
34 | 50 | * Test index method |
35 | 51 | * |
... | ... | @@ -37,7 +53,14 @@ class SuivisControllerTest extends IntegrationTestCase |
37 | 53 | */ |
38 | 54 | public function testIndex() |
39 | 55 | { |
40 | - $this->markTestIncomplete('Not implemented yet.'); | |
56 | + $this->authUser(); | |
57 | + | |
58 | + //1) On doit pouvoir accéder à la page une fois authentifié | |
59 | + $this->get('/suivis/index'); | |
60 | + $this->assertNoRedirect("Authentifier mais redirection vers /users/login."); | |
61 | + | |
62 | + //2) On doit avoir 2 suivis | |
63 | + $this->assertResponseContains("Liste des suivis (2)", "Le nombre de suivis renvoyé est incorrect."); | |
41 | 64 | } |
42 | 65 | |
43 | 66 | /** |
... | ... | @@ -47,7 +70,10 @@ class SuivisControllerTest extends IntegrationTestCase |
47 | 70 | */ |
48 | 71 | public function testView() |
49 | 72 | { |
50 | - $this->markTestIncomplete('Not implemented yet.'); | |
73 | + $this->authUser(); | |
74 | + | |
75 | + $this->get('/suivis/view/2'); | |
76 | + $this->assertResponseContains("TEST VIEW SUIVI VALIDE", "Le suivi retourné n'est pas celui demandé."); | |
51 | 77 | } |
52 | 78 | |
53 | 79 | /** |
... | ... | @@ -57,7 +83,27 @@ class SuivisControllerTest extends IntegrationTestCase |
57 | 83 | */ |
58 | 84 | public function testAdd() |
59 | 85 | { |
60 | - $this->markTestIncomplete('Not implemented yet.'); | |
86 | + $this->authUser(); | |
87 | + | |
88 | + $data = [ | |
89 | + 'id' => 5, | |
90 | + 'materiel_id' => 1, | |
91 | + 'date_controle' => '2016-04-19', | |
92 | + 'date_prochain_controle' => '2016-04-19', | |
93 | + 'type_intervention' => 'Lorem ipsum dolor sit amet', | |
94 | + 'organisme' => 'Lorem ipsum dolor sit amet', | |
95 | + 'frequence' => 1, | |
96 | + 'commentaire' => 'TEST ADD SUIVI VALIDE', | |
97 | + 'nom_createur' => 'Lorem ipsum dolor sit amet', | |
98 | + 'nom_modificateur' => 'Lorem ipsum dolor sit amet', | |
99 | + 'created' => '2016-04-19 09:09:28', | |
100 | + 'modified' => '2016-04-19 09:09:28' | |
101 | + ]; | |
102 | + $this->post('/suivis/add', $data); | |
103 | + | |
104 | + $this->get('/suivis/index'); | |
105 | + $this->assertResponseContains("Liste des suivis (3)", "Le suivi ne s'ajoute pas correctement."); | |
106 | + | |
61 | 107 | } |
62 | 108 | |
63 | 109 | /** |
... | ... | @@ -67,7 +113,25 @@ class SuivisControllerTest extends IntegrationTestCase |
67 | 113 | */ |
68 | 114 | public function testEdit() |
69 | 115 | { |
70 | - $this->markTestIncomplete('Not implemented yet.'); | |
116 | + $this->authUser(); | |
117 | + | |
118 | + $data = [ | |
119 | + 'materiel_id' => 1, | |
120 | + 'date_controle' => '2016-04-19', | |
121 | + 'date_prochain_controle' => '2016-04-19', | |
122 | + 'type_intervention' => 'Lorem ipsum dolor sit amet', | |
123 | + 'organisme' => 'Lorem ipsum dolor sit amet', | |
124 | + 'frequence' => 1, | |
125 | + 'commentaire' => 'TEST EDIT SUIVI VALIDE', | |
126 | + 'nom_createur' => 'Lorem ipsum dolor sit amet', | |
127 | + 'nom_modificateur' => 'Lorem ipsum dolor sit amet', | |
128 | + 'created' => '2016-04-19 09:09:28', | |
129 | + 'modified' => '2016-04-19 09:09:28' | |
130 | + ]; | |
131 | + $this->post('/suivis/edit/1', $data); | |
132 | + $this->get('/suivis/view/1'); | |
133 | + $this->assertResponseContains("TEST EDIT SUIVI VALIDE", "Le suivi n'a pas était édité correctement"); | |
134 | + | |
71 | 135 | } |
72 | 136 | |
73 | 137 | /** |
... | ... | @@ -77,6 +141,10 @@ class SuivisControllerTest extends IntegrationTestCase |
77 | 141 | */ |
78 | 142 | public function testDelete() |
79 | 143 | { |
80 | - $this->markTestIncomplete('Not implemented yet.'); | |
144 | + $this->authUser(); | |
145 | + | |
146 | + $this->post('/suivis/delete/2'); | |
147 | + $this->get('/suivis/index'); | |
148 | + $this->assertResponseContains("Liste des suivis (1)", "Le suivi n'as pas été supprimé."); | |
81 | 149 | } |
82 | 150 | } | ... | ... |
tests/TestCase/Controller/SurCategoriesControllerTest.php deleted
... | ... | @@ -1,71 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\SurCategoriesController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\SurCategoriesController Test Case | |
9 | - */ | |
10 | -class SurCategoriesControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.sur_categories' | |
20 | - ]; | |
21 | - | |
22 | - /** | |
23 | - * Test index method | |
24 | - * | |
25 | - * @return void | |
26 | - */ | |
27 | - public function testIndex() | |
28 | - { | |
29 | - $this->markTestIncomplete('Not implemented yet.'); | |
30 | - } | |
31 | - | |
32 | - /** | |
33 | - * Test view method | |
34 | - * | |
35 | - * @return void | |
36 | - */ | |
37 | - public function testView() | |
38 | - { | |
39 | - $this->markTestIncomplete('Not implemented yet.'); | |
40 | - } | |
41 | - | |
42 | - /** | |
43 | - * Test add method | |
44 | - * | |
45 | - * @return void | |
46 | - */ | |
47 | - public function testAdd() | |
48 | - { | |
49 | - $this->markTestIncomplete('Not implemented yet.'); | |
50 | - } | |
51 | - | |
52 | - /** | |
53 | - * Test edit method | |
54 | - * | |
55 | - * @return void | |
56 | - */ | |
57 | - public function testEdit() | |
58 | - { | |
59 | - $this->markTestIncomplete('Not implemented yet.'); | |
60 | - } | |
61 | - | |
62 | - /** | |
63 | - * Test delete method | |
64 | - * | |
65 | - * @return void | |
66 | - */ | |
67 | - public function testDelete() | |
68 | - { | |
69 | - $this->markTestIncomplete('Not implemented yet.'); | |
70 | - } | |
71 | -} |
tests/TestCase/Controller/TypeSuivisControllerTest.php deleted
... | ... | @@ -1,71 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\TypeSuivisController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\TypeSuivisController Test Case | |
9 | - */ | |
10 | -class TypeSuivisControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.type_suivis' | |
20 | - ]; | |
21 | - | |
22 | - /** | |
23 | - * Test index method | |
24 | - * | |
25 | - * @return void | |
26 | - */ | |
27 | - public function testIndex() | |
28 | - { | |
29 | - $this->markTestIncomplete('Not implemented yet.'); | |
30 | - } | |
31 | - | |
32 | - /** | |
33 | - * Test view method | |
34 | - * | |
35 | - * @return void | |
36 | - */ | |
37 | - public function testView() | |
38 | - { | |
39 | - $this->markTestIncomplete('Not implemented yet.'); | |
40 | - } | |
41 | - | |
42 | - /** | |
43 | - * Test add method | |
44 | - * | |
45 | - * @return void | |
46 | - */ | |
47 | - public function testAdd() | |
48 | - { | |
49 | - $this->markTestIncomplete('Not implemented yet.'); | |
50 | - } | |
51 | - | |
52 | - /** | |
53 | - * Test edit method | |
54 | - * | |
55 | - * @return void | |
56 | - */ | |
57 | - public function testEdit() | |
58 | - { | |
59 | - $this->markTestIncomplete('Not implemented yet.'); | |
60 | - } | |
61 | - | |
62 | - /** | |
63 | - * Test delete method | |
64 | - * | |
65 | - * @return void | |
66 | - */ | |
67 | - public function testDelete() | |
68 | - { | |
69 | - $this->markTestIncomplete('Not implemented yet.'); | |
70 | - } | |
71 | -} |
tests/TestCase/Controller/UsersControllerTest.php deleted
... | ... | @@ -1,82 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Controller; | |
3 | - | |
4 | -use App\Controller\UsersController; | |
5 | -use Cake\TestSuite\IntegrationTestCase; | |
6 | - | |
7 | -/** | |
8 | - * App\Controller\UsersController Test Case | |
9 | - */ | |
10 | -class UsersControllerTest extends IntegrationTestCase | |
11 | -{ | |
12 | - | |
13 | - /** | |
14 | - * Fixtures | |
15 | - * | |
16 | - * @var array | |
17 | - */ | |
18 | - public $fixtures = [ | |
19 | - 'app.users', | |
20 | - 'app.groupes_metiers', | |
21 | - 'app.materiels', | |
22 | - 'app.sur_categories', | |
23 | - 'app.categories', | |
24 | - 'app.sous_categories', | |
25 | - 'app.groupes_thematiques', | |
26 | - 'app.organismes', | |
27 | - 'app.sites', | |
28 | - 'app.documents', | |
29 | - 'app.suivis', | |
30 | - 'app.emprunts', | |
31 | - ]; | |
32 | - | |
33 | - /** | |
34 | - * Test index method | |
35 | - * | |
36 | - * @return void | |
37 | - */ | |
38 | - public function testIndex() | |
39 | - { | |
40 | - $this->markTestIncomplete('Not implemented yet.'); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * Test view method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function testView() | |
49 | - { | |
50 | - $this->markTestIncomplete('Not implemented yet.'); | |
51 | - } | |
52 | - | |
53 | - /** | |
54 | - * Test add method | |
55 | - * | |
56 | - * @return void | |
57 | - */ | |
58 | - public function testAdd() | |
59 | - { | |
60 | - $this->markTestIncomplete('Not implemented yet.'); | |
61 | - } | |
62 | - | |
63 | - /** | |
64 | - * Test edit method | |
65 | - * | |
66 | - * @return void | |
67 | - */ | |
68 | - public function testEdit() | |
69 | - { | |
70 | - $this->markTestIncomplete('Not implemented yet.'); | |
71 | - } | |
72 | - | |
73 | - /** | |
74 | - * Test delete method | |
75 | - * | |
76 | - * @return void | |
77 | - */ | |
78 | - public function testDelete() | |
79 | - { | |
80 | - $this->markTestIncomplete('Not implemented yet.'); | |
81 | - } | |
82 | -} |
tests/TestCase/Model/Table/CategoriesTableTest.php deleted
... | ... | @@ -1,84 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\CategoriesTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\CategoriesTable Test Case | |
10 | - */ | |
11 | -class CategoriesTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\CategoriesTable | |
18 | - */ | |
19 | - public $Categories; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.categories', | |
28 | - 'app.sur_categories' | |
29 | - ]; | |
30 | - | |
31 | - /** | |
32 | - * setUp method | |
33 | - * | |
34 | - * @return void | |
35 | - */ | |
36 | - public function setUp() | |
37 | - { | |
38 | - parent::setUp(); | |
39 | - $config = TableRegistry::exists('Categories') ? [] : ['className' => 'App\Model\Table\CategoriesTable']; | |
40 | - $this->Categories = TableRegistry::get('Categories', $config); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * tearDown method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function tearDown() | |
49 | - { | |
50 | - unset($this->Categories); | |
51 | - | |
52 | - parent::tearDown(); | |
53 | - } | |
54 | - | |
55 | - /** | |
56 | - * Test initialize method | |
57 | - * | |
58 | - * @return void | |
59 | - */ | |
60 | - public function testInitialize() | |
61 | - { | |
62 | - $this->markTestIncomplete('Not implemented yet.'); | |
63 | - } | |
64 | - | |
65 | - /** | |
66 | - * Test validationDefault method | |
67 | - * | |
68 | - * @return void | |
69 | - */ | |
70 | - public function testValidationDefault() | |
71 | - { | |
72 | - $this->markTestIncomplete('Not implemented yet.'); | |
73 | - } | |
74 | - | |
75 | - /** | |
76 | - * Test buildRules method | |
77 | - * | |
78 | - * @return void | |
79 | - */ | |
80 | - public function testBuildRules() | |
81 | - { | |
82 | - $this->markTestIncomplete('Not implemented yet.'); | |
83 | - } | |
84 | -} |
tests/TestCase/Model/Table/ConfigurationsTableTest.php deleted
... | ... | @@ -1,83 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\ConfigurationsTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\ConfigurationsTable Test Case | |
10 | - */ | |
11 | -class ConfigurationsTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\ConfigurationsTable | |
18 | - */ | |
19 | - public $Configurations; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.configurations' | |
28 | - ]; | |
29 | - | |
30 | - /** | |
31 | - * setUp method | |
32 | - * | |
33 | - * @return void | |
34 | - */ | |
35 | - public function setUp() | |
36 | - { | |
37 | - parent::setUp(); | |
38 | - $config = TableRegistry::exists('Configurations') ? [] : ['className' => 'App\Model\Table\ConfigurationsTable']; | |
39 | - $this->Configurations = TableRegistry::get('Configurations', $config); | |
40 | - } | |
41 | - | |
42 | - /** | |
43 | - * tearDown method | |
44 | - * | |
45 | - * @return void | |
46 | - */ | |
47 | - public function tearDown() | |
48 | - { | |
49 | - unset($this->Configurations); | |
50 | - | |
51 | - parent::tearDown(); | |
52 | - } | |
53 | - | |
54 | - /** | |
55 | - * Test initialize method | |
56 | - * | |
57 | - * @return void | |
58 | - */ | |
59 | - public function testInitialize() | |
60 | - { | |
61 | - $this->markTestIncomplete('Not implemented yet.'); | |
62 | - } | |
63 | - | |
64 | - /** | |
65 | - * Test validationDefault method | |
66 | - * | |
67 | - * @return void | |
68 | - */ | |
69 | - public function testValidationDefault() | |
70 | - { | |
71 | - $this->markTestIncomplete('Not implemented yet.'); | |
72 | - } | |
73 | - | |
74 | - /** | |
75 | - * Test buildRules method | |
76 | - * | |
77 | - * @return void | |
78 | - */ | |
79 | - public function testBuildRules() | |
80 | - { | |
81 | - $this->markTestIncomplete('Not implemented yet.'); | |
82 | - } | |
83 | -} |
tests/TestCase/Model/Table/DocumentsTableTest.php deleted
... | ... | @@ -1,85 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\DocumentsTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\DocumentsTable Test Case | |
10 | - */ | |
11 | -class DocumentsTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\DocumentsTable | |
18 | - */ | |
19 | - public $Documents; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.documents', | |
28 | - 'app.materiels', | |
29 | - 'app.suivis' | |
30 | - ]; | |
31 | - | |
32 | - /** | |
33 | - * setUp method | |
34 | - * | |
35 | - * @return void | |
36 | - */ | |
37 | - public function setUp() | |
38 | - { | |
39 | - parent::setUp(); | |
40 | - $config = TableRegistry::exists('Documents') ? [] : ['className' => 'App\Model\Table\DocumentsTable']; | |
41 | - $this->Documents = TableRegistry::get('Documents', $config); | |
42 | - } | |
43 | - | |
44 | - /** | |
45 | - * tearDown method | |
46 | - * | |
47 | - * @return void | |
48 | - */ | |
49 | - public function tearDown() | |
50 | - { | |
51 | - unset($this->Documents); | |
52 | - | |
53 | - parent::tearDown(); | |
54 | - } | |
55 | - | |
56 | - /** | |
57 | - * Test initialize method | |
58 | - * | |
59 | - * @return void | |
60 | - */ | |
61 | - public function testInitialize() | |
62 | - { | |
63 | - $this->markTestIncomplete('Not implemented yet.'); | |
64 | - } | |
65 | - | |
66 | - /** | |
67 | - * Test validationDefault method | |
68 | - * | |
69 | - * @return void | |
70 | - */ | |
71 | - public function testValidationDefault() | |
72 | - { | |
73 | - $this->markTestIncomplete('Not implemented yet.'); | |
74 | - } | |
75 | - | |
76 | - /** | |
77 | - * Test buildRules method | |
78 | - * | |
79 | - * @return void | |
80 | - */ | |
81 | - public function testBuildRules() | |
82 | - { | |
83 | - $this->markTestIncomplete('Not implemented yet.'); | |
84 | - } | |
85 | -} |
tests/TestCase/Model/Table/EmpruntsTableTest.php deleted
... | ... | @@ -1,84 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\EmpruntsTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\EmpruntsTable Test Case | |
10 | - */ | |
11 | -class EmpruntsTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\EmpruntsTable | |
18 | - */ | |
19 | - public $Emprunts; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.emprunts', | |
28 | - 'app.materiels' | |
29 | - ]; | |
30 | - | |
31 | - /** | |
32 | - * setUp method | |
33 | - * | |
34 | - * @return void | |
35 | - */ | |
36 | - public function setUp() | |
37 | - { | |
38 | - parent::setUp(); | |
39 | - $config = TableRegistry::exists('Emprunts') ? [] : ['className' => 'App\Model\Table\EmpruntsTable']; | |
40 | - $this->Emprunts = TableRegistry::get('Emprunts', $config); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * tearDown method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function tearDown() | |
49 | - { | |
50 | - unset($this->Emprunts); | |
51 | - | |
52 | - parent::tearDown(); | |
53 | - } | |
54 | - | |
55 | - /** | |
56 | - * Test initialize method | |
57 | - * | |
58 | - * @return void | |
59 | - */ | |
60 | - public function testInitialize() | |
61 | - { | |
62 | - $this->markTestIncomplete('Not implemented yet.'); | |
63 | - } | |
64 | - | |
65 | - /** | |
66 | - * Test validationDefault method | |
67 | - * | |
68 | - * @return void | |
69 | - */ | |
70 | - public function testValidationDefault() | |
71 | - { | |
72 | - $this->markTestIncomplete('Not implemented yet.'); | |
73 | - } | |
74 | - | |
75 | - /** | |
76 | - * Test buildRules method | |
77 | - * | |
78 | - * @return void | |
79 | - */ | |
80 | - public function testBuildRules() | |
81 | - { | |
82 | - $this->markTestIncomplete('Not implemented yet.'); | |
83 | - } | |
84 | -} |
tests/TestCase/Model/Table/GroupesMetiersTableTest.php deleted
... | ... | @@ -1,74 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\GroupesMetiersTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\GroupesMetiersTable Test Case | |
10 | - */ | |
11 | -class GroupesMetiersTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\GroupesMetiersTable | |
18 | - */ | |
19 | - public $GroupesMetiers; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.groupes_metiers', | |
28 | - 'app.materiels', | |
29 | - ]; | |
30 | - | |
31 | - /** | |
32 | - * setUp method | |
33 | - * | |
34 | - * @return void | |
35 | - */ | |
36 | - public function setUp() | |
37 | - { | |
38 | - parent::setUp(); | |
39 | - $config = TableRegistry::exists('GroupesMetiers') ? [] : ['className' => 'App\Model\Table\GroupesMetiersTable']; | |
40 | - $this->GroupesMetiers = TableRegistry::get('GroupesMetiers', $config); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * tearDown method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function tearDown() | |
49 | - { | |
50 | - unset($this->GroupesMetiers); | |
51 | - | |
52 | - parent::tearDown(); | |
53 | - } | |
54 | - | |
55 | - /** | |
56 | - * Test initialize method | |
57 | - * | |
58 | - * @return void | |
59 | - */ | |
60 | - public function testInitialize() | |
61 | - { | |
62 | - $this->markTestIncomplete('Not implemented yet.'); | |
63 | - } | |
64 | - | |
65 | - /** | |
66 | - * Test validationDefault method | |
67 | - * | |
68 | - * @return void | |
69 | - */ | |
70 | - public function testValidationDefault() | |
71 | - { | |
72 | - $this->markTestIncomplete('Not implemented yet.'); | |
73 | - } | |
74 | -} |
tests/TestCase/Model/Table/GroupesThematiquesTableTest.php deleted
... | ... | @@ -1,74 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\GroupesThematiquesTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\GroupesThematiquesTable Test Case | |
10 | - */ | |
11 | -class GroupesThematiquesTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\GroupesThematiquesTable | |
18 | - */ | |
19 | - public $GroupesThematiques; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.groupes_thematiques', | |
28 | - 'app.materiels' | |
29 | - ]; | |
30 | - | |
31 | - /** | |
32 | - * setUp method | |
33 | - * | |
34 | - * @return void | |
35 | - */ | |
36 | - public function setUp() | |
37 | - { | |
38 | - parent::setUp(); | |
39 | - $config = TableRegistry::exists('GroupesThematiques') ? [] : ['className' => 'App\Model\Table\GroupesThematiquesTable']; | |
40 | - $this->GroupesThematiques = TableRegistry::get('GroupesThematiques', $config); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * tearDown method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function tearDown() | |
49 | - { | |
50 | - unset($this->GroupesThematiques); | |
51 | - | |
52 | - parent::tearDown(); | |
53 | - } | |
54 | - | |
55 | - /** | |
56 | - * Test initialize method | |
57 | - * | |
58 | - * @return void | |
59 | - */ | |
60 | - public function testInitialize() | |
61 | - { | |
62 | - $this->markTestIncomplete('Not implemented yet.'); | |
63 | - } | |
64 | - | |
65 | - /** | |
66 | - * Test validationDefault method | |
67 | - * | |
68 | - * @return void | |
69 | - */ | |
70 | - public function testValidationDefault() | |
71 | - { | |
72 | - $this->markTestIncomplete('Not implemented yet.'); | |
73 | - } | |
74 | -} |
tests/TestCase/Model/Table/MaterielsTableTest.php
... | ... | @@ -63,23 +63,31 @@ class MaterielsTableTest extends TestCase |
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
66 | - * Test initialize method | |
66 | + * Test check_string method | |
67 | 67 | * |
68 | 68 | * @return void |
69 | 69 | */ |
70 | - public function testInitialize() | |
70 | + public function testCheck_string() | |
71 | 71 | { |
72 | - $this->markTestIncomplete('Not implemented yet.'); | |
72 | + $result = $this->Materiels->check_string("& materiel"); | |
73 | + $this->assertTextEquals(false, $result); | |
74 | + | |
75 | + $result = $this->Materiels->check_string("materiel"); | |
76 | + $this->assertTextEquals(true, $result); | |
73 | 77 | } |
74 | - | |
78 | + | |
75 | 79 | /** |
76 | - * Test validationDefault method | |
80 | + * Test check_string_with_some_special_cars method | |
77 | 81 | * |
78 | 82 | * @return void |
79 | 83 | */ |
80 | - public function testValidationDefault() | |
84 | + public function testCheck_string_with_some_special_cars() | |
81 | 85 | { |
82 | - $this->markTestIncomplete('Not implemented yet.'); | |
86 | + $result = $this->Materiels->check_string_with_some_special_cars("$$ materiel"); | |
87 | + $this->assertTextEquals(false, $result); | |
88 | + | |
89 | + $result = $this->Materiels->check_string_with_some_special_cars("& materiel"); | |
90 | + $this->assertTextEquals(true, $result); | |
83 | 91 | } |
84 | 92 | |
85 | 93 | /** |
... | ... | @@ -89,26 +97,26 @@ class MaterielsTableTest extends TestCase |
89 | 97 | */ |
90 | 98 | public function testCheckStatus() |
91 | 99 | { |
92 | - $this->markTestIncomplete('Not implemented yet.'); | |
93 | - } | |
100 | + $result = $this->Materiels->checkStatus("pas un status"); | |
101 | + $this->assertTextEquals(false, $result); | |
94 | 102 | |
95 | - /** | |
96 | - * Test buildRules method | |
97 | - * | |
98 | - * @return void | |
99 | - */ | |
100 | - public function testBuildRules() | |
101 | - { | |
102 | - $this->markTestIncomplete('Not implemented yet.'); | |
103 | - } | |
103 | + $result = $this->Materiels->checkStatus("CREATE"); | |
104 | + $this->assertTextEquals(false, $result); | |
104 | 105 | |
105 | - /** | |
106 | - * Test beforeSave method | |
107 | - * | |
108 | - * @return void | |
109 | - */ | |
110 | - public function testBeforeSave() | |
111 | - { | |
112 | - $this->markTestIncomplete('Not implemented yet.'); | |
106 | + $result = $this->Materiels->checkStatus("CREATED"); | |
107 | + $this->assertTextEquals(true, $result); | |
108 | + | |
109 | + $result = $this->Materiels->checkStatus("VALIDATED"); | |
110 | + $this->assertTextEquals(true, $result); | |
111 | + | |
112 | + $result = $this->Materiels->checkStatus("TOBEARCHIVED"); | |
113 | + $this->assertTextEquals(true, $result); | |
114 | + | |
115 | + $result = $this->Materiels->checkStatus("ARCHIVED"); | |
116 | + $this->assertTextEquals(true, $result); | |
113 | 117 | } |
118 | + | |
119 | + | |
120 | + | |
121 | + | |
114 | 122 | } | ... | ... |
tests/TestCase/Model/Table/OrganismesTableTest.php deleted
... | ... | @@ -1,74 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\OrganismesTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\OrganismesTable Test Case | |
10 | - */ | |
11 | -class OrganismesTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\OrganismesTable | |
18 | - */ | |
19 | - public $Organismes; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.organismes', | |
28 | - 'app.materiels' | |
29 | - ]; | |
30 | - | |
31 | - /** | |
32 | - * setUp method | |
33 | - * | |
34 | - * @return void | |
35 | - */ | |
36 | - public function setUp() | |
37 | - { | |
38 | - parent::setUp(); | |
39 | - $config = TableRegistry::exists('Organismes') ? [] : ['className' => 'App\Model\Table\OrganismesTable']; | |
40 | - $this->Organismes = TableRegistry::get('Organismes', $config); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * tearDown method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function tearDown() | |
49 | - { | |
50 | - unset($this->Organismes); | |
51 | - | |
52 | - parent::tearDown(); | |
53 | - } | |
54 | - | |
55 | - /** | |
56 | - * Test initialize method | |
57 | - * | |
58 | - * @return void | |
59 | - */ | |
60 | - public function testInitialize() | |
61 | - { | |
62 | - $this->markTestIncomplete('Not implemented yet.'); | |
63 | - } | |
64 | - | |
65 | - /** | |
66 | - * Test validationDefault method | |
67 | - * | |
68 | - * @return void | |
69 | - */ | |
70 | - public function testValidationDefault() | |
71 | - { | |
72 | - $this->markTestIncomplete('Not implemented yet.'); | |
73 | - } | |
74 | -} |
tests/TestCase/Model/Table/SitesTableTest.php deleted
... | ... | @@ -1,74 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\SitesTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\SitesTable Test Case | |
10 | - */ | |
11 | -class SitesTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\SitesTable | |
18 | - */ | |
19 | - public $Sites; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.sites', | |
28 | - 'app.materiels' | |
29 | - ]; | |
30 | - | |
31 | - /** | |
32 | - * setUp method | |
33 | - * | |
34 | - * @return void | |
35 | - */ | |
36 | - public function setUp() | |
37 | - { | |
38 | - parent::setUp(); | |
39 | - $config = TableRegistry::exists('Sites') ? [] : ['className' => 'App\Model\Table\SitesTable']; | |
40 | - $this->Sites = TableRegistry::get('Sites', $config); | |
41 | - } | |
42 | - | |
43 | - /** | |
44 | - * tearDown method | |
45 | - * | |
46 | - * @return void | |
47 | - */ | |
48 | - public function tearDown() | |
49 | - { | |
50 | - unset($this->Sites); | |
51 | - | |
52 | - parent::tearDown(); | |
53 | - } | |
54 | - | |
55 | - /** | |
56 | - * Test initialize method | |
57 | - * | |
58 | - * @return void | |
59 | - */ | |
60 | - public function testInitialize() | |
61 | - { | |
62 | - $this->markTestIncomplete('Not implemented yet.'); | |
63 | - } | |
64 | - | |
65 | - /** | |
66 | - * Test validationDefault method | |
67 | - * | |
68 | - * @return void | |
69 | - */ | |
70 | - public function testValidationDefault() | |
71 | - { | |
72 | - $this->markTestIncomplete('Not implemented yet.'); | |
73 | - } | |
74 | -} |
tests/TestCase/Model/Table/SousCategoriesTableTest.php deleted
... | ... | @@ -1,85 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\SousCategoriesTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\SousCategoriesTable Test Case | |
10 | - */ | |
11 | -class SousCategoriesTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\SousCategoriesTable | |
18 | - */ | |
19 | - public $SousCategories; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.sous_categories', | |
28 | - 'app.categories', | |
29 | - 'app.sur_categories' | |
30 | - ]; | |
31 | - | |
32 | - /** | |
33 | - * setUp method | |
34 | - * | |
35 | - * @return void | |
36 | - */ | |
37 | - public function setUp() | |
38 | - { | |
39 | - parent::setUp(); | |
40 | - $config = TableRegistry::exists('SousCategories') ? [] : ['className' => 'App\Model\Table\SousCategoriesTable']; | |
41 | - $this->SousCategories = TableRegistry::get('SousCategories', $config); | |
42 | - } | |
43 | - | |
44 | - /** | |
45 | - * tearDown method | |
46 | - * | |
47 | - * @return void | |
48 | - */ | |
49 | - public function tearDown() | |
50 | - { | |
51 | - unset($this->SousCategories); | |
52 | - | |
53 | - parent::tearDown(); | |
54 | - } | |
55 | - | |
56 | - /** | |
57 | - * Test initialize method | |
58 | - * | |
59 | - * @return void | |
60 | - */ | |
61 | - public function testInitialize() | |
62 | - { | |
63 | - $this->markTestIncomplete('Not implemented yet.'); | |
64 | - } | |
65 | - | |
66 | - /** | |
67 | - * Test validationDefault method | |
68 | - * | |
69 | - * @return void | |
70 | - */ | |
71 | - public function testValidationDefault() | |
72 | - { | |
73 | - $this->markTestIncomplete('Not implemented yet.'); | |
74 | - } | |
75 | - | |
76 | - /** | |
77 | - * Test buildRules method | |
78 | - * | |
79 | - * @return void | |
80 | - */ | |
81 | - public function testBuildRules() | |
82 | - { | |
83 | - $this->markTestIncomplete('Not implemented yet.'); | |
84 | - } | |
85 | -} |
tests/TestCase/Model/Table/SuivisTableTest.php deleted
... | ... | @@ -1,85 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\SuivisTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\SuivisTable Test Case | |
10 | - */ | |
11 | -class SuivisTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\SuivisTable | |
18 | - */ | |
19 | - public $Suivis; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.suivis', | |
28 | - 'app.materiels', | |
29 | - 'app.documents' | |
30 | - ]; | |
31 | - | |
32 | - /** | |
33 | - * setUp method | |
34 | - * | |
35 | - * @return void | |
36 | - */ | |
37 | - public function setUp() | |
38 | - { | |
39 | - parent::setUp(); | |
40 | - $config = TableRegistry::exists('Suivis') ? [] : ['className' => 'App\Model\Table\SuivisTable']; | |
41 | - $this->Suivis = TableRegistry::get('Suivis', $config); | |
42 | - } | |
43 | - | |
44 | - /** | |
45 | - * tearDown method | |
46 | - * | |
47 | - * @return void | |
48 | - */ | |
49 | - public function tearDown() | |
50 | - { | |
51 | - unset($this->Suivis); | |
52 | - | |
53 | - parent::tearDown(); | |
54 | - } | |
55 | - | |
56 | - /** | |
57 | - * Test initialize method | |
58 | - * | |
59 | - * @return void | |
60 | - */ | |
61 | - public function testInitialize() | |
62 | - { | |
63 | - $this->markTestIncomplete('Not implemented yet.'); | |
64 | - } | |
65 | - | |
66 | - /** | |
67 | - * Test validationDefault method | |
68 | - * | |
69 | - * @return void | |
70 | - */ | |
71 | - public function testValidationDefault() | |
72 | - { | |
73 | - $this->markTestIncomplete('Not implemented yet.'); | |
74 | - } | |
75 | - | |
76 | - /** | |
77 | - * Test buildRules method | |
78 | - * | |
79 | - * @return void | |
80 | - */ | |
81 | - public function testBuildRules() | |
82 | - { | |
83 | - $this->markTestIncomplete('Not implemented yet.'); | |
84 | - } | |
85 | -} |
tests/TestCase/Model/Table/SurCategoriesTableTest.php deleted
... | ... | @@ -1,83 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\SurCategoriesTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\SurCategoriesTable Test Case | |
10 | - */ | |
11 | -class SurCategoriesTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\SurCategoriesTable | |
18 | - */ | |
19 | - public $SurCategories; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.sur_categories' | |
28 | - ]; | |
29 | - | |
30 | - /** | |
31 | - * setUp method | |
32 | - * | |
33 | - * @return void | |
34 | - */ | |
35 | - public function setUp() | |
36 | - { | |
37 | - parent::setUp(); | |
38 | - $config = TableRegistry::exists('SurCategories') ? [] : ['className' => 'App\Model\Table\SurCategoriesTable']; | |
39 | - $this->SurCategories = TableRegistry::get('SurCategories', $config); | |
40 | - } | |
41 | - | |
42 | - /** | |
43 | - * tearDown method | |
44 | - * | |
45 | - * @return void | |
46 | - */ | |
47 | - public function tearDown() | |
48 | - { | |
49 | - unset($this->SurCategories); | |
50 | - | |
51 | - parent::tearDown(); | |
52 | - } | |
53 | - | |
54 | - /** | |
55 | - * Test initialize method | |
56 | - * | |
57 | - * @return void | |
58 | - */ | |
59 | - public function testInitialize() | |
60 | - { | |
61 | - $this->markTestIncomplete('Not implemented yet.'); | |
62 | - } | |
63 | - | |
64 | - /** | |
65 | - * Test validationDefault method | |
66 | - * | |
67 | - * @return void | |
68 | - */ | |
69 | - public function testValidationDefault() | |
70 | - { | |
71 | - $this->markTestIncomplete('Not implemented yet.'); | |
72 | - } | |
73 | - | |
74 | - /** | |
75 | - * Test buildRules method | |
76 | - * | |
77 | - * @return void | |
78 | - */ | |
79 | - public function testBuildRules() | |
80 | - { | |
81 | - $this->markTestIncomplete('Not implemented yet.'); | |
82 | - } | |
83 | -} |
tests/TestCase/Model/Table/TypeSuivisTableTest.php deleted
... | ... | @@ -1,73 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\TypeSuivisTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\TypeSuivisTable Test Case | |
10 | - */ | |
11 | -class TypeSuivisTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\TypeSuivisTable | |
18 | - */ | |
19 | - public $TypeSuivis; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.type_suivis' | |
28 | - ]; | |
29 | - | |
30 | - /** | |
31 | - * setUp method | |
32 | - * | |
33 | - * @return void | |
34 | - */ | |
35 | - public function setUp() | |
36 | - { | |
37 | - parent::setUp(); | |
38 | - $config = TableRegistry::exists('TypeSuivis') ? [] : ['className' => 'App\Model\Table\TypeSuivisTable']; | |
39 | - $this->TypeSuivis = TableRegistry::get('TypeSuivis', $config); | |
40 | - } | |
41 | - | |
42 | - /** | |
43 | - * tearDown method | |
44 | - * | |
45 | - * @return void | |
46 | - */ | |
47 | - public function tearDown() | |
48 | - { | |
49 | - unset($this->TypeSuivis); | |
50 | - | |
51 | - parent::tearDown(); | |
52 | - } | |
53 | - | |
54 | - /** | |
55 | - * Test initialize method | |
56 | - * | |
57 | - * @return void | |
58 | - */ | |
59 | - public function testInitialize() | |
60 | - { | |
61 | - $this->markTestIncomplete('Not implemented yet.'); | |
62 | - } | |
63 | - | |
64 | - /** | |
65 | - * Test validationDefault method | |
66 | - * | |
67 | - * @return void | |
68 | - */ | |
69 | - public function testValidationDefault() | |
70 | - { | |
71 | - $this->markTestIncomplete('Not implemented yet.'); | |
72 | - } | |
73 | -} |
tests/TestCase/Model/Table/UsersTableTest.php deleted
... | ... | @@ -1,94 +0,0 @@ |
1 | -<?php | |
2 | -namespace App\Test\TestCase\Model\Table; | |
3 | - | |
4 | -use App\Model\Table\UsersTable; | |
5 | -use Cake\ORM\TableRegistry; | |
6 | -use Cake\TestSuite\TestCase; | |
7 | - | |
8 | -/** | |
9 | - * App\Model\Table\UsersTable Test Case | |
10 | - */ | |
11 | -class UsersTableTest extends TestCase | |
12 | -{ | |
13 | - | |
14 | - /** | |
15 | - * Test subject | |
16 | - * | |
17 | - * @var \App\Model\Table\UsersTable | |
18 | - */ | |
19 | - public $Users; | |
20 | - | |
21 | - /** | |
22 | - * Fixtures | |
23 | - * | |
24 | - * @var array | |
25 | - */ | |
26 | - public $fixtures = [ | |
27 | - 'app.users', | |
28 | - 'app.groupes_metiers', | |
29 | - 'app.materiels', | |
30 | - 'app.sur_categories', | |
31 | - 'app.categories', | |
32 | - 'app.sous_categories', | |
33 | - 'app.groupes_thematiques', | |
34 | - 'app.organismes', | |
35 | - 'app.sites', | |
36 | - 'app.documents', | |
37 | - 'app.suivis', | |
38 | - 'app.emprunts', | |
39 | - ]; | |
40 | - | |
41 | - /** | |
42 | - * setUp method | |
43 | - * | |
44 | - * @return void | |
45 | - */ | |
46 | - public function setUp() | |
47 | - { | |
48 | - parent::setUp(); | |
49 | - $config = TableRegistry::exists('Users') ? [] : ['className' => 'App\Model\Table\UsersTable']; | |
50 | - $this->Users = TableRegistry::get('Users', $config); | |
51 | - } | |
52 | - | |
53 | - /** | |
54 | - * tearDown method | |
55 | - * | |
56 | - * @return void | |
57 | - */ | |
58 | - public function tearDown() | |
59 | - { | |
60 | - unset($this->Users); | |
61 | - | |
62 | - parent::tearDown(); | |
63 | - } | |
64 | - | |
65 | - /** | |
66 | - * Test initialize method | |
67 | - * | |
68 | - * @return void | |
69 | - */ | |
70 | - public function testInitialize() | |
71 | - { | |
72 | - $this->markTestIncomplete('Not implemented yet.'); | |
73 | - } | |
74 | - | |
75 | - /** | |
76 | - * Test validationDefault method | |
77 | - * | |
78 | - * @return void | |
79 | - */ | |
80 | - public function testValidationDefault() | |
81 | - { | |
82 | - $this->markTestIncomplete('Not implemented yet.'); | |
83 | - } | |
84 | - | |
85 | - /** | |
86 | - * Test buildRules method | |
87 | - * | |
88 | - * @return void | |
89 | - */ | |
90 | - public function testBuildRules() | |
91 | - { | |
92 | - $this->markTestIncomplete('Not implemented yet.'); | |
93 | - } | |
94 | -} |