public static function transformToArray(OrderStatusObject $orderStatus) { return ["pstrIdVenta" => $orderStatus->getIdOrder(), "pstrPINCompra" => $orderStatus->getPin(), "EstadoVenta" => $orderStatus->getStatus()]; }
public function test_change_status_should_work() { $expected = (object) ["CambiarEstadoVentaResult" => (object) ["EjecucionExitosa" => true, "MensajeValidacion" => null]]; $this->soapFake->shouldReceive("CambiarEstadoVenta")->andReturn($expected); $changeStatus = new OrderStatus(); $changeStatus->setStatus(OrderStatus::STATUS_APPROVED)->setPin(123)->setIdOrder(123); $result = $this->client->changeStatus($changeStatus); $this->assertTrue($result); }