SII falla si fecha está en el futuro.

This commit is contained in:
Juan Pablo Vial
2025-05-07 19:42:39 -04:00
parent f3e15b34a8
commit 878b02ee52
2 changed files with 17 additions and 0 deletions

View File

@ -5,6 +5,7 @@ use PDO;
use PDOStatement;
use GuzzleHttp\Client;
use PHPUnit\Framework\TestCase;
use Incoviba\Common\Implement\Exception\EmptyResponse;
use Incoviba\Service;
use Incoviba\Repository;
use Incoviba\Common\Define;
@ -53,4 +54,13 @@ class SIITest extends TestCase
$this->assertEquals($expected, $provider->get(Service\Money::UF, $date));
}
public function testGetNoValid(): void
{
$provider = new Service\Money\SII($this->client, $this->ufRepository);
$date = (new \DateTimeImmutable())->add(new \DateInterval("P1Y"));
$this->expectException(EmptyResponse::class);
$provider->get(Service\Money::UF, $date);
}
}