public function testBuscarSeguimientosDeOrden() { $lista = ServiciosController::ListaOrden(); $this->assertInternalType('int', $lista["numero_de_resultados"]); //debe haber por lo menos un resultado $this->assertGreaterThan(0, $lista["numero_de_resultados"]); $old = $lista["numero_de_resultados"]; //insertar un seguimiento... ServiciosController::SeguimientoOrden(_pos_phpunit_servicios_orden_de_servicio, null, null, "nota para la orden 2"); //$lista = ServiciosController::ListaOrden( ); //$this->assertEquals( $lista["numero_de_resultados"], $old + 1); }
protected function GenerateResponse() { try { $this->response = ServiciosController::SeguimientoOrden(isset($_POST['id_orden_de_servicio']) ? $_POST['id_orden_de_servicio'] : null, isset($_POST['abono']) ? json_decode($_POST['abono']) : null, isset($_POST['id_localizacion']) ? $_POST['id_localizacion'] : null, isset($_POST['nota']) ? $_POST['nota'] : null); } catch (Exception $e) { //Logger::error($e); throw new ApiException($this->error_dispatcher->invalidDatabaseOperation($e->getMessage())); } }