italia / fatturapa-testsdi

Sistema d'Interscambio di test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FullDemo::testCheckExpiration2 fails

simevo opened this issue · comments

to reproduce run ./vendor/bin/phpunit tests/FullDemo.php --filter testCheckExpiration2 and get:

1) FullDemo::testCheckExpiration2
Failed asserting that 0 matches expected 1.

.../tests/FullDemo.php:92
.../tests/FullDemo.php:865

this is caused by RicezioneFattureHandler::NotificaDecorrenzaTermini:

  • it is not storing the notification (should call Base::receive)
  • it is trying to set to R_EXPIRED the invoice with invoice_id received from ES, but that row in invoices table does not "belong" to recipient (it should set to R_EXPIRED the invoice with remote_id equal to invoice_id received from sdi)

it would be easier to implement RicezioneFattureHandler::NotificaDecorrenzaTermini reusing code from TrasmissioneFattureHandler::NotificaDecorrenzaTermini