|
@@ -118,91 +118,91 @@ class ONURESTControllerTest extends WebTestCaseBase
|
|
|
$this->assertEquals(201, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Realiza una busqueda.
|
|
|
- * get_onus -> /api/onus.{_format}
|
|
|
- * controller: ClientBundle:ClientREST:cget
|
|
|
- * Method: GET
|
|
|
- */
|
|
|
- public function testGET_POST()
|
|
|
- {
|
|
|
- // obtengo la respuesta
|
|
|
- $response = $this->generateGET();
|
|
|
- // verifco el resultado
|
|
|
- $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
- $this->assertJson($response->getContent(), "No se obtuvo un objeto json.");
|
|
|
- $this->assertContains($this->obtainData('ponSerialNumber'), strtolower($response->getContent()), "Error al buscar al onu.");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Realiza una modificacion.
|
|
|
- * put_onu -> /api/onus.{_format}
|
|
|
- * controller: ClientBundle:ClientREST:put
|
|
|
- * Method: PUT
|
|
|
- */
|
|
|
- public function testPUT()
|
|
|
- {
|
|
|
- $this->initDefault($this->obtainDataWebService());
|
|
|
- $response = $this->generateGET();
|
|
|
- $id = $this->getProperty($response, 'id');
|
|
|
- // realizo la consulta
|
|
|
- $data = $this->obtainDataChange($this->obtainData(), array('ponSerialNumber' => 'pon_modifi', 'id' => $id));
|
|
|
- $this->getClient()->request('PUT', $this->getUriPutDelete() . $id, $data);
|
|
|
- // obtengo la respuesta
|
|
|
- $response = $this->getClient()->getResponse();
|
|
|
- $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Realiza una busqueda.
|
|
|
- * get_onus -> /api/onus.{_format}
|
|
|
- * controller: ClientBundle:ClientREST:cget
|
|
|
- * Method: GET
|
|
|
- */
|
|
|
- public function testGET_PUT()
|
|
|
- {
|
|
|
- $response = $this->generateGET();
|
|
|
- // verifco el resultado
|
|
|
- $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
- $this->assertJson($response->getContent(), "No se obtuvo un objeto json.");
|
|
|
- $this->assertContains('pon_modifi', strtolower($response->getContent()), "Error al buscar al onu modificado.");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * Realiza una baja.
|
|
|
- * delete_onu -> /api/onus.{_format}
|
|
|
- * controller: ClientBundle:ClientREST:delete
|
|
|
- * Method: DELETE
|
|
|
- */
|
|
|
- public function testDELETE()
|
|
|
- {
|
|
|
- // busco el id de
|
|
|
- $response = $this->generateGET();
|
|
|
- // obtengo el id de la respuesta de la busqueda
|
|
|
- $id = $this->getProperty($response, 'id');
|
|
|
- $this->initDefault();
|
|
|
- // realizo la consulta
|
|
|
- $data = array('tenancy' => 1);
|
|
|
- $this->getClient()->request('DELETE', $this->getUriPutDelete() . $id, $data);
|
|
|
- // obtengo la respuesta
|
|
|
- $response = $this->getClient()->getResponse();
|
|
|
- $this->assertEquals(204, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Realiza una busqueda.
|
|
|
- * get_onus -> /api/onus.{_format}
|
|
|
- * controller: ClientBundle:ClientREST:cget
|
|
|
- * Method: GET
|
|
|
- */
|
|
|
- public function testGET_DELETE()
|
|
|
- {
|
|
|
- $response = $this->generateGET();
|
|
|
- // verifco el resultado
|
|
|
- $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
- $json = json_decode($response->getContent());
|
|
|
- $this->assertTrue(empty($json), "No se obtuvo un objeto json.");
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * Realiza una busqueda.
|
|
|
+// * get_onus -> /api/onus.{_format}
|
|
|
+// * controller: ClientBundle:ClientREST:cget
|
|
|
+// * Method: GET
|
|
|
+// */
|
|
|
+// public function testGET_POST()
|
|
|
+// {
|
|
|
+// // obtengo la respuesta
|
|
|
+// $response = $this->generateGET();
|
|
|
+// // verifco el resultado
|
|
|
+// $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
+// $this->assertJson($response->getContent(), "No se obtuvo un objeto json.");
|
|
|
+// $this->assertContains($this->obtainData('ponSerialNumber'), strtolower($response->getContent()), "Error al buscar al onu.");
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Realiza una modificacion.
|
|
|
+// * put_onu -> /api/onus.{_format}
|
|
|
+// * controller: ClientBundle:ClientREST:put
|
|
|
+// * Method: PUT
|
|
|
+// */
|
|
|
+// public function testPUT()
|
|
|
+// {
|
|
|
+// $this->initDefault($this->obtainDataWebService());
|
|
|
+// $response = $this->generateGET();
|
|
|
+// $id = $this->getProperty($response, 'id');
|
|
|
+// // realizo la consulta
|
|
|
+// $data = $this->obtainDataChange($this->obtainData(), array('ponSerialNumber' => 'pon_modifi', 'id' => $id));
|
|
|
+// $this->getClient()->request('PUT', $this->getUriPutDelete() . $id, $data);
|
|
|
+// // obtengo la respuesta
|
|
|
+// $response = $this->getClient()->getResponse();
|
|
|
+// $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Realiza una busqueda.
|
|
|
+// * get_onus -> /api/onus.{_format}
|
|
|
+// * controller: ClientBundle:ClientREST:cget
|
|
|
+// * Method: GET
|
|
|
+// */
|
|
|
+// public function testGET_PUT()
|
|
|
+// {
|
|
|
+// $response = $this->generateGET();
|
|
|
+// // verifco el resultado
|
|
|
+// $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
+// $this->assertJson($response->getContent(), "No se obtuvo un objeto json.");
|
|
|
+// $this->assertContains('pon_modifi', strtolower($response->getContent()), "Error al buscar al onu modificado.");
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Realiza una baja.
|
|
|
+// * delete_onu -> /api/onus.{_format}
|
|
|
+// * controller: ClientBundle:ClientREST:delete
|
|
|
+// * Method: DELETE
|
|
|
+// */
|
|
|
+// public function testDELETE()
|
|
|
+// {
|
|
|
+// // busco el id de
|
|
|
+// $response = $this->generateGET();
|
|
|
+// // obtengo el id de la respuesta de la busqueda
|
|
|
+// $id = $this->getProperty($response, 'id');
|
|
|
+// $this->initDefault();
|
|
|
+// // realizo la consulta
|
|
|
+// $data = array('tenancy' => 1);
|
|
|
+// $this->getClient()->request('DELETE', $this->getUriPutDelete() . $id, $data);
|
|
|
+// // obtengo la respuesta
|
|
|
+// $response = $this->getClient()->getResponse();
|
|
|
+// $this->assertEquals(204, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
+// }
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * Realiza una busqueda.
|
|
|
+// * get_onus -> /api/onus.{_format}
|
|
|
+// * controller: ClientBundle:ClientREST:cget
|
|
|
+// * Method: GET
|
|
|
+// */
|
|
|
+// public function testGET_DELETE()
|
|
|
+// {
|
|
|
+// $response = $this->generateGET();
|
|
|
+// // verifco el resultado
|
|
|
+// $this->assertEquals(200, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
+// $json = json_decode($response->getContent());
|
|
|
+// $this->assertTrue(empty($json), "No se obtuvo un objeto json.");
|
|
|
+// }
|
|
|
|
|
|
}
|