From a6e6b8acc055a4c026ff22eb402f15bb8f404753 Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Tue, 24 Jun 2025 12:56:03 -0400 Subject: [PATCH] Prueba de integracion para service worker --- app/tests/integration/QueueTest.php | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 app/tests/integration/QueueTest.php diff --git a/app/tests/integration/QueueTest.php b/app/tests/integration/QueueTest.php new file mode 100644 index 0000000..dda22b9 --- /dev/null +++ b/app/tests/integration/QueueTest.php @@ -0,0 +1,36 @@ +container = buildContainer(); + } + + public function testServiceWorker(): void + { + $pagoData = [ + 'fecha' => '2022-01-01', + 'valor' => 10000, + ]; + $pagoService = $this->container->get(Service\Venta\Pago::class); + $pago = $pagoService->add($pagoData); + + $queueService = $this->container->get(Service\Queue::class); + $queueService->run(); + + $pago = $pagoService->getById($pago->id); + $this->assertNotEquals(0.0, $pago->uf); + } +} \ No newline at end of file