mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 21:47:32 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			964 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			964 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
/**
 | 
						|
 * Invoice Ninja (https://invoiceninja.com).
 | 
						|
 *
 | 
						|
 * @link https://github.com/invoiceninja/invoiceninja source repository
 | 
						|
 *
 | 
						|
 * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
 | 
						|
 *
 | 
						|
 * @license https://opensource.org/licenses/AAL
 | 
						|
 */
 | 
						|
namespace Tests\Integration;
 | 
						|
 | 
						|
use App\Jobs\Entity\CreateEntityPdf;
 | 
						|
use Illuminate\Foundation\Testing\DatabaseTransactions;
 | 
						|
use Tests\MockAccountData;
 | 
						|
use Tests\TestCase;
 | 
						|
 | 
						|
/**
 | 
						|
 * @test
 | 
						|
 * @covers App\Services\Invoice\GetInvoicePdf
 | 
						|
 */
 | 
						|
class InvoiceUploadTest extends TestCase
 | 
						|
{
 | 
						|
    use MockAccountData;
 | 
						|
    use DatabaseTransactions;
 | 
						|
 | 
						|
    public function setUp() :void
 | 
						|
    {
 | 
						|
        parent::setUp();
 | 
						|
 | 
						|
        $this->makeTestData();
 | 
						|
    }
 | 
						|
 | 
						|
    public function testInvoiceUploadWorks()
 | 
						|
    {
 | 
						|
        CreateEntityPdf::dispatchNow($this->invoice->invitations->first());
 | 
						|
 | 
						|
        $this->assertNotNull($this->invoice->service()->getInvoicePdf($this->invoice->client->primary_contact()->first()));
 | 
						|
    }
 | 
						|
}
 |