| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace Tests\Services\LaborApplyService;
- use App\Services\LaborApplyService;
- use Tests\TestCase;
- use App\LaborApply;
- use App\Traits\TestMockSubServices;
- class AllocationLaborToLaborCompanyTest extends TestCase
- {
- use TestMockSubServices;
- /** @var LaborApplyService $service */
- public $service;
- private $data;
- private $amount=2;
- function setUp(): void
- {
- parent::setUp();
- $this->service = app('LaborApplyService');
- $this->data['laborApplies']
- = factory(LaborApply::class, $this->amount)
- ->create();
- }
- public function testReturned()
- {
- $this->assertTrue(true);
- }
- function tearDown(): void
- {
- LaborApply::query()
- ->whereIn('id',data_get($this->data['laborApplies'],'*.id')??[])
- ->delete();
- parent::tearDown();
- }
- public function test_01()
- {
- $this->data['laborApplies'] = factory(LaborApply::class)->times(20)->create();
- $this->service->allocationLaborToLaborCompany();
- }
- }
|