invoiceninja/tests/Feature/Export/ExportCompanyTest.php

54 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2021-05-13 13:57:18 +10: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 13:57:18 +10:00
*/
2021-05-13 13:57:18 +10:00
namespace Tests\Feature\Export;
use App\Jobs\Company\CompanyExport;
use App\Utils\Traits\MakesHash;
use Illuminate\Routing\Middleware\ThrottleRequests;
use Tests\MockAccountData;
use Tests\TestCase;
/**
* @test
*/
class ExportCompanyTest extends TestCase
{
use MakesHash;
use MockAccountData;
protected function setUp(): void
2021-05-13 13:57:18 +10:00
{
parent::setUp();
$this->withoutMiddleware(
ThrottleRequests::class
);
// $this->faker = \Faker\Factory::create();
$this->makeTestData();
$this->withoutExceptionHandling();
2021-05-27 09:16:41 +10:00
if (!config('ninja.testvars.stripe')) {
2021-05-27 09:16:41 +10:00
$this->markTestSkipped('Cannot write to TMP - skipping');
}
2021-05-13 13:57:18 +10:00
}
public function testCompanyExport()
{
$res = (new CompanyExport($this->company, $this->company->users->first()))->handle();
2021-05-13 20:18:30 +10:00
2021-05-14 13:32:37 +10:00
$this->assertTrue($res);
2021-05-13 13:57:18 +10:00
}
}