gabriel %!s(int64=6) %!d(string=hai) anos
pai
achega
07436212cf
Modificáronse 1 ficheiros con 20 adicións e 6 borrados
  1. 20 6
      src/FTTHBundle/tests/ONURESTControllerTest.php

+ 20 - 6
src/FTTHBundle/tests/ONURESTControllerTest.php

@@ -74,16 +74,28 @@ class ONURESTControllerTest extends WebTestCaseBase
     {
         $datos = array();
         $datos['oltId'] = '';
-        $datos['model'] = '1';
-        $datos['nap'] = 1;
-        $datos['profile'] = '1';
+        $datos['modelId'] = '1';
+        $datos['napId'] = '1';
+//        $datos['nap'] = 1;
+        $datos['profileId'] = '1';
         $datos['mac'] = '00:11:22:33';
         $datos['ponSerialNumber'] = 'pon';
         $datos['clientId'] = 1;
         $datos['tenancyId'] = 1;
         $datos['deviceId'] = 1;
-//        $datos['vlanProfile'] = ;
-//        $datos['onuProfile'] = ;
+
+//        $datos = array();
+//        $datos['oltId'] = '';
+//        $datos['model'] = '1';
+//        $datos['nap'] = 1;
+//        $datos['profile'] = '1';
+//        $datos['mac'] = '00:11:22:33';
+//        $datos['ponSerialNumber'] = 'pon';
+//        $datos['clientId'] = 1;
+//        $datos['tenancyId'] = 1;
+//        $datos['deviceId'] = 1;
+////        $datos['vlanProfile'] = ;
+////        $datos['onuProfile'] = ;        $datos['ip'] = '';
 
         if ($key == null) {
             return $datos;
@@ -203,12 +215,14 @@ class ONURESTControllerTest extends WebTestCaseBase
         // hago la inserccion llamando al servicio por post
         $this->getClient()->request('POST', $this->getOLTUri(), $this->obtainOLTData());
         $response = $this->getClient()->getResponse();
-        //var_dump($response);
+        var_dump($response);
         $this->getClient()->request('POST', $this->getNAPUri(), $this->obtainNAPData());
         $response = $this->getClient()->getResponse();
+        var_dump($response);
         $this->getClient()->request('POST', $this->getUri(), $this->obtainData());
         // obtengo la respuesta
         $response = $this->getClient()->getResponse();
+        var_dump($response);
         $this->assertEquals(201, $response->getStatusCode(), "Error en la respuesta http.");
     }