|
@@ -24,7 +24,7 @@ class CMTSRESTControllerTest extends WebTestCaseBase
|
|
|
*/
|
|
|
protected function getPOSTUri()
|
|
|
{
|
|
|
- return '/api/cmtss.json';
|
|
|
+ return '/api/cmts.json';
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -67,8 +67,7 @@ class CMTSRESTControllerTest extends WebTestCaseBase
|
|
|
'timeCmtsOctets' => 5,
|
|
|
'executeSnmp' => true,
|
|
|
'extraData' => '',
|
|
|
- 'tenancyId' => '1',
|
|
|
- 'modelId' => '1'
|
|
|
+ 'tenancyId' => 1
|
|
|
];
|
|
|
|
|
|
if ($key == null) {
|
|
@@ -132,18 +131,13 @@ class CMTSRESTControllerTest extends WebTestCaseBase
|
|
|
public function testPOST()
|
|
|
{
|
|
|
// inicializo con los datos del webservicemock
|
|
|
- print_r("Previo init");
|
|
|
$this->initDefault($this->obtainDataWebService());
|
|
|
- print_r("Pasó por Init");
|
|
|
// seteo los datos del listener
|
|
|
$this->setListener();
|
|
|
- print_r("Pasó por Listener");
|
|
|
// hago la inserccion llamando al servicio por post
|
|
|
$this->getClient()->request('POST', $this->getPOSTUri(), $this->obtainData());
|
|
|
- print_r("Pasó por request");
|
|
|
// obtengo la respuesta
|
|
|
$response = $this->getClient()->getResponse();
|
|
|
- print_r($response);
|
|
|
|
|
|
$this->assertEquals(201, $response->getStatusCode(), "Error en la respuesta http.");
|
|
|
}
|