This commit is contained in:
2026-11-02 08:06:45 +02:00
parent e4f520092e
commit 2a4169162b
108 changed files with 3793 additions and 88 deletions
+2
View File
@@ -9,6 +9,8 @@ use Illuminate\Support\Str;
use Tests\Support\{DirectCostFixture,IdentityFixture};
use Tests\TestCase;
final class WorkshopBillingTest extends TestCase {
use \Tests\Support\UsesModuleFixture;
protected function moduleFixture(): string { return 'workshop'; }
use RefreshDatabase;
private array $f;private int $service;private string $token;
protected function setUp(): void {parent::setUp();$this->f=DirectCostFixture::create();foreach(['manager'=>['view','prepare','generate'],'reader'=>['view','review']] as $who=>$rights){foreach($rights as $r)IdentityFixture::grant($this->f[$who]->id,$this->f['tenant'],$this->f['company'],'workshop_billing.'.$r,$this->f['unit']);IdentityFixture::grant($this->f[$who]->id,$this->f['tenant'],$this->f['company'],'workshop.view',$this->f['unit']);}$this->service=app(ServiceWorkflow::class)->save('services',null,$this->f['manager']->id,['name'=>'Serviço comercial sintético'],(string)Str::uuid())['id'];$this->login();}