public function remove($id) {
$this->loadModel('Echange');
$this->loadModel('Modification');
+ $this->loadModel('Communication');
// on désafecte tous les contacts qui dependent de cet user
$this->desaffecter($id);
// On desaffecte toutes les Communication
$this->Communication->updateAll(
- array('communication.userorigine' => null), array('Communication.userorigine' => $id)
+ array('Communication.userorigine' => null), array('Communication.userorigine' => $id)
);
$this->Communication->updateAll(
- array('communication.userdestination' => null), array('Communication.userdestination' => $id)
+ array('Communication.userdestination' => null), array('Communication.userdestination' => $id)
);
msgstr "Structure"
-msgid ""
-msgstr ""
+msgid "nom"
+msgstr "Nom"
-msgid ""
-msgstr ""
+msgid "prenom"
+msgstr "Prenom"
class ContactsTest extends ControllerTestCase {
- /**
- * @expectedException NotFoundException
- *
- * si non logué
- */
- public function testExceptions() {
- $this->testAction('/Contacts/edit/1');
-
- }
-
+
+
+
+
+
}
--- /dev/null
+<?php
+
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of GestionTest
+ *
+ * @author rdubourget
+ */
+
+app::uses('Gestion', 'Controller');
+app::uses('AppController', 'Controller');
+class GestionTest extends ControllerTestCase {
+
+ public function testAdministrer(){
+ $this->testAction('/Gestion/administrer/');
+
+ }
+
+
+ public function testAllContacts(){
+ $this->testAction('/Gestion/allContacts/');
+
+ }
+
+ public function testFollowedContacts(){
+ $this->testAction('/Gestion/followedContacts/');
+
+ }
+
+ public function testSuivre(){
+ $this->testAction('/Gestion/suivre/');
+
+ }
+
+ //doit interdire l'action car non referent
+ /* public function testConsulter(){
+ $this->testAction('/Gestion/consulter/1');
+
+ }*/
+
+
+
+ public function testRemove(){
+ $this->testAction('/Gestion/remove/2');
+
+ }
+
+
+
+
+
+
+
+
+}
--- /dev/null
+<?php
+
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+
+/**
+ * Description of GestionTest
+ *
+ * @author rdubourget
+ */
+
+app::uses('GestionUser', 'Controller');
+app::uses('AppController', 'Controller');
+class GestionUserTest extends ControllerTestCase {
+
+ public function testGestion(){
+ $this->testAction('/GestionUser/gestion/');
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+