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