2020-04-10 07:07:36 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Unit;
|
|
|
|
|
|
|
|
use App\Factory\InvoiceFactory;
|
|
|
|
use App\Factory\InvoiceItemFactory;
|
|
|
|
use App\Helpers\Invoice\InvoiceSum;
|
|
|
|
use App\Helpers\Invoice\InvoiceSumInclusive;
|
|
|
|
use App\Jobs\Invoice\CreateUbl;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
use Illuminate\Routing\Middleware\ThrottleRequests;
|
|
|
|
use Tests\MockAccountData;
|
|
|
|
use Tests\TestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @covers App\Jobs\Invoice\CreateUbl
|
|
|
|
*/
|
|
|
|
class UBLInvoiceTest extends TestCase
|
|
|
|
{
|
|
|
|
use MockAccountData;
|
|
|
|
use DatabaseTransactions;
|
|
|
|
|
|
|
|
public function setUp() :void
|
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
$this->withoutMiddleware(
|
|
|
|
ThrottleRequests::class
|
|
|
|
);
|
|
|
|
$this->makeTestData();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testUblGenerates()
|
|
|
|
{
|
|
|
|
$ubl = CreateUbl::dispatchNow($this->invoice);
|
|
|
|
|
|
|
|
$this->assertNotNull($ubl);
|
|
|
|
}
|
2020-04-15 02:30:52 +02:00
|
|
|
}
|