1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01:00
invoiceninja/tests/Feature/Export/ExportCompanyTest.php

57 lines
1.2 KiB
PHP
Raw Normal View History

2021-05-13 05:57:18 +02:00
<?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://www.elastic.co/licensing/elastic-license
2021-05-13 05:57:18 +02:00
*/
2021-05-13 05:57:18 +02:00
namespace Tests\Feature\Export;
use App\Jobs\Company\CompanyExport;
use App\Models\Invoice;
use App\Utils\Traits\MakesHash;
use Illuminate\Routing\Middleware\ThrottleRequests;
use Illuminate\Support\Facades\Storage;
use League\Csv\Writer;
use Tests\MockAccountData;
use Tests\TestCase;
/**
* @test
*/
class ExportCompanyTest extends TestCase
{
use MakesHash;
use MockAccountData;
protected function setUp() :void
2021-05-13 05:57:18 +02:00
{
parent::setUp();
$this->withoutMiddleware(
ThrottleRequests::class
);
// $this->faker = \Faker\Factory::create();
$this->makeTestData();
$this->withoutExceptionHandling();
2021-05-27 01:16:41 +02:00
if (! config('ninja.testvars.stripe')) {
$this->markTestSkipped('Cannot write to TMP - skipping');
}
2021-05-13 05:57:18 +02:00
}
public function testCompanyExport()
{
2021-05-14 05:32:37 +02:00
$res = CompanyExport::dispatchNow($this->company, $this->company->users->first());
2021-05-13 12:18:30 +02:00
2021-05-14 05:32:37 +02:00
$this->assertTrue($res);
2021-05-13 05:57:18 +02:00
}
}