|
@@ -140,16 +140,23 @@ class CMTSRESTControllerTest extends WebTestCaseBase
|
|
|
*/
|
|
|
public function testPOST()
|
|
|
{
|
|
|
- // inicializo con los datos del webservicemock
|
|
|
- $this->initDefault($this->obtainDataWebService());
|
|
|
- // seteo los datos del listener
|
|
|
- $this->setListener();
|
|
|
- // hago la inserccion llamando al servicio por post
|
|
|
- $this->getClient()->request('POST', $this->getPOSTUri(), $this->obtainData());
|
|
|
- // obtengo la respuesta
|
|
|
- $response = $this->getClient()->getResponse();
|
|
|
+ try {
|
|
|
+
|
|
|
+ // inicializo con los datos del webservicemock
|
|
|
+ $this->initDefault($this->obtainDataWebService());
|
|
|
+ // seteo los datos del listener
|
|
|
+ $this->setListener();
|
|
|
+ // hago la inserccion llamando al servicio por post
|
|
|
+ $this->getClient()->request('POST', $this->getPOSTUri(), $this->obtainData());
|
|
|
+ // obtengo la respuesta
|
|
|
+ $response = $this->getClient()->getResponse();
|
|
|
|
|
|
- $this->assertEquals(201, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
+ $this->assertEquals(201, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
+ } catch (\Exception $ex) {
|
|
|
+ if ($ex instanceof HandledErrorException) {
|
|
|
+ $ex->cleanOutput();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|