use DataBaseTruncation instead of RefreshDataBase
This commit is contained in:
@@ -12,7 +12,7 @@ trait CreatesApplication
|
||||
*/
|
||||
public function createApplication(): Application
|
||||
{
|
||||
$app = require __DIR__ . '/../bootstrap/app.php';
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
$app->make(Kernel::class)->bootstrap();
|
||||
|
||||
|
||||
@@ -13,8 +13,7 @@ use App\Models\Province;
|
||||
use App\Models\RoadItemsProject;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
@@ -23,7 +22,7 @@ use Tests\TestCase;
|
||||
|
||||
class DeleteTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -13,8 +13,7 @@ use App\Models\Province;
|
||||
use App\Models\RoadItemsProject;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
@@ -23,7 +22,7 @@ use Tests\TestCase;
|
||||
|
||||
class RestoreTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -13,8 +13,7 @@ use App\Models\Province;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use App\Services\NominatimService;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
@@ -23,7 +22,7 @@ use Tests\TestCase;
|
||||
|
||||
class StoreTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -13,8 +13,7 @@ use App\Models\Province;
|
||||
use App\Models\RoadItemsProject;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
@@ -23,7 +22,7 @@ use Tests\TestCase;
|
||||
|
||||
class UpdateTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -7,13 +7,12 @@ use App\Models\Permission;
|
||||
use App\Models\Province;
|
||||
use App\Models\RoadObserved;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Tests\TestCase;
|
||||
|
||||
class CountTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -8,8 +8,7 @@ use App\Models\Permission;
|
||||
use App\Models\RoadObserved;
|
||||
use App\Models\User;
|
||||
use App\Services\NikarayanService;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Mockery\MockInterface;
|
||||
@@ -17,7 +16,7 @@ use Tests\TestCase;
|
||||
|
||||
class HandleTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
@@ -27,6 +26,10 @@ class HandleTest extends TestCase
|
||||
|
||||
$roadObserved = RoadObserved::factory()->create();
|
||||
|
||||
$this->mock(NikarayanService::class, function (MockInterface $mock) {
|
||||
$mock->shouldReceive('updateRoadObservedInfoByNikarayan')->andReturn(0);
|
||||
});
|
||||
|
||||
$response = $this->actingAs($user)->postJson("/v2/road_observations/handle/{$roadObserved->id}");
|
||||
|
||||
$response->assertForbidden();
|
||||
|
||||
@@ -6,13 +6,12 @@ use App\Models\EdarateShahri;
|
||||
use App\Models\LogList;
|
||||
use App\Models\RoadObserved;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ReferTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -6,13 +6,12 @@ use App\Models\LogList;
|
||||
use App\Models\Permission;
|
||||
use App\Models\RoadObserved;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Tests\TestCase;
|
||||
|
||||
class RestoreTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -6,13 +6,12 @@ use App\Models\LogList;
|
||||
use App\Models\Permission;
|
||||
use App\Models\RoadObserved;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Tests\TestCase;
|
||||
|
||||
class verifyBySupervisorTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -11,13 +11,12 @@ use App\Models\ObservedItem;
|
||||
use App\Models\Permission;
|
||||
use App\Models\RoadPatrol;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Tests\TestCase;
|
||||
|
||||
class DeleteTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -5,13 +5,12 @@ namespace Tests\Feature\V2\Dashboard\RoadPatrolProject;
|
||||
use App\Models\Province;
|
||||
use App\Models\RoadPatrol;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Tests\TestCase;
|
||||
|
||||
class GetAllDataToMapTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
@@ -58,13 +57,13 @@ class GetAllDataToMapTest extends TestCase
|
||||
|
||||
RoadPatrol::factory()
|
||||
->sequence(
|
||||
['created_at' => '2022-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 1],
|
||||
['created_at' => '2025-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 5],
|
||||
['created_at' => '2022-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 9],
|
||||
['created_at' => '2026-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 2],
|
||||
['created_at' => '2022-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 6],
|
||||
['created_at' => '2026-08-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 16],
|
||||
['created_at' => '2022-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 35],
|
||||
["id" => 1, 'created_at' => '2022-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 1],
|
||||
["id" => 2, 'created_at' => '2025-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 5],
|
||||
["id" => 3, 'created_at' => '2022-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 9],
|
||||
["id" => 4, 'created_at' => '2026-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 2],
|
||||
["id" => 5, 'created_at' => '2022-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 6],
|
||||
["id" => 6, 'created_at' => '2026-08-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 16],
|
||||
["id" => 7, 'created_at' => '2022-05-03 12:25:00', 'province_id' => $province->id, 'edare_id' => 35],
|
||||
)
|
||||
->count(7)
|
||||
->create();
|
||||
|
||||
@@ -12,16 +12,14 @@ use App\Models\Permission;
|
||||
use App\Models\Province;
|
||||
use App\Models\User;
|
||||
use App\Services\NominatimService;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Mockery\MockInterface;
|
||||
use Tests\TestCase;
|
||||
|
||||
class StoreTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
@@ -627,97 +625,6 @@ class StoreTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_can_store_a_road_patrol_when_instant_action_is_0(): void
|
||||
{
|
||||
$city = City::factory()->create();
|
||||
$edarateShari = EdarateShahri::factory()->create();
|
||||
$logList = LogList::factory()->create([
|
||||
'log_unique_code' => 1147
|
||||
]);
|
||||
|
||||
$user = User::factory()
|
||||
->has(Permission::factory([
|
||||
'name' => 'add-road-patrol'
|
||||
]))
|
||||
->create([
|
||||
'city_id' => $city->id,
|
||||
'edarate_shahri_id' => $edarateShari->id
|
||||
]);
|
||||
|
||||
$attributes = [
|
||||
'start_point' => '12,12',
|
||||
'end_point' => '13,13',
|
||||
'officer_name' => $this->faker->name,
|
||||
'officer_plaque' => $this->faker->numerify(),
|
||||
'officer_phone_number' => $this->faker->numerify("###########"),
|
||||
'start_time' => '2016-01-23 11:53',
|
||||
'end_time' => '2017-01-23 11:53',
|
||||
'observed_items' => [
|
||||
[
|
||||
'after_image' => UploadedFile::fake()->create('image.jpg', 10),
|
||||
'item_id' => 1,
|
||||
'sub_item_id' => 1,
|
||||
'local_name' => $this->faker->name(),
|
||||
'instant_action' => 0,
|
||||
'start_point' => '12,12',
|
||||
'priority' => $this->faker->numberBetween(1, 3),
|
||||
'priority_fa' => $this->faker->name,
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
$infoItem = InfoItem::factory()->create([
|
||||
'item' => 1,
|
||||
'sub_item' => 1,
|
||||
]);
|
||||
|
||||
$mock = $this->mock(NominatimService::class, function (MockInterface $mock) {
|
||||
$mock->shouldReceive('get_way_id_from_nominatim')->andReturn(0);
|
||||
});
|
||||
|
||||
Sms::shouldReceive('sendSms');
|
||||
|
||||
$response = $this->actingAs($user)->postJson('v2/road_patrols/operator/store', $attributes);
|
||||
|
||||
$response->assertOk();
|
||||
|
||||
$this->assertDatabaseHas('road_patrols', [
|
||||
'start_lat' => 12,
|
||||
'start_lon' => 12,
|
||||
'end_lat' => 13,
|
||||
'end_lon' => 13,
|
||||
'officer_name' => $attributes['officer_name'],
|
||||
'officer_phone_number' => $attributes['officer_phone_number'],
|
||||
'officer_plaque' => $attributes['officer_plaque'],
|
||||
'operator_id' => $user->id,
|
||||
'operator_name' => $user->name,
|
||||
'province_id' => $user->province_id,
|
||||
'province_fa' => $user->province_fa,
|
||||
'city_id' => $user->city_id,
|
||||
'city_fa' => $user->city_fa,
|
||||
'edare_id' => $user->edarate_shahri_id,
|
||||
'edare_name' => $user->edarate_shahri_name,
|
||||
'start_way_id' => 0,
|
||||
'end_way_id' => 0,
|
||||
'status' => 0,
|
||||
'status_fa' => 'در حال بررسی',
|
||||
'start_time' => $attributes['start_time'],
|
||||
'end_time' => $attributes['end_time'],
|
||||
'description' => null,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('observed_items', [
|
||||
'item_id' => $infoItem->item,
|
||||
'item_name' => $infoItem->item_str,
|
||||
'sub_item_id' => $infoItem->sub_item,
|
||||
'sub_item_name' => $infoItem->sub_item_str,
|
||||
'local_name' => $attributes['observed_items'][0]['local_name'],
|
||||
'description' => null,
|
||||
'start_lat' => 12,
|
||||
'start_lon' => 12,
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_end_point_is_required_when_instant_action_is_1(): void
|
||||
{
|
||||
$city = City::factory()->create();
|
||||
@@ -981,11 +888,12 @@ class StoreTest extends TestCase
|
||||
'end_time' => '2017-01-23 11:53',
|
||||
'observed_items' => [
|
||||
[
|
||||
'start_point' => '12,12',
|
||||
'end_point' => '13,13',
|
||||
'item_id' => 1,
|
||||
'sub_item_id' => 1,
|
||||
'local_name' => $this->faker->name(),
|
||||
'instant_action' => 1,
|
||||
'start_point' => '12,12',
|
||||
'priority' => $this->faker->numberBetween(1, 3),
|
||||
'priority_fa' => $this->faker->name,
|
||||
'amount' => $this->faker->numberBetween(1, 10)
|
||||
@@ -996,6 +904,7 @@ class StoreTest extends TestCase
|
||||
$infoItem = InfoItem::factory()->create([
|
||||
'item' => 1,
|
||||
'sub_item' => 1,
|
||||
'needs_end_point' => 1
|
||||
]);
|
||||
|
||||
$mock = $this->mock(NominatimService::class, function (MockInterface $mock) {
|
||||
@@ -1069,4 +978,95 @@ class StoreTest extends TestCase
|
||||
'is_new' => 1,
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_user_can_store_a_road_patrol_when_instant_action_is_0(): void
|
||||
{
|
||||
$city = City::factory()->create();
|
||||
$edarateShari = EdarateShahri::factory()->create();
|
||||
$logList = LogList::factory()->create([
|
||||
'log_unique_code' => 1147
|
||||
]);
|
||||
|
||||
$user = User::factory()
|
||||
->has(Permission::factory([
|
||||
'name' => 'add-road-patrol'
|
||||
]))
|
||||
->create([
|
||||
'city_id' => $city->id,
|
||||
'edarate_shahri_id' => $edarateShari->id
|
||||
]);
|
||||
|
||||
$attributes = [
|
||||
'start_point' => '12,12',
|
||||
'end_point' => '13,13',
|
||||
'officer_name' => $this->faker->name,
|
||||
'officer_plaque' => $this->faker->numerify(),
|
||||
'officer_phone_number' => $this->faker->numerify("###########"),
|
||||
'start_time' => '2016-01-23 11:53',
|
||||
'end_time' => '2017-01-23 11:53',
|
||||
'observed_items' => [
|
||||
[
|
||||
'after_image' => UploadedFile::fake()->create('image.jpg', 10),
|
||||
'item_id' => 1,
|
||||
'sub_item_id' => 1,
|
||||
'local_name' => $this->faker->name(),
|
||||
'instant_action' => 0,
|
||||
'start_point' => '12,12',
|
||||
'priority' => $this->faker->numberBetween(1, 3),
|
||||
'priority_fa' => $this->faker->name,
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
$infoItem = InfoItem::factory()->create([
|
||||
'item' => 1,
|
||||
'sub_item' => 1,
|
||||
]);
|
||||
|
||||
$mock = $this->mock(NominatimService::class, function (MockInterface $mock) {
|
||||
$mock->shouldReceive('get_way_id_from_nominatim')->andReturn(0);
|
||||
});
|
||||
|
||||
Sms::shouldReceive('sendSms');
|
||||
|
||||
$response = $this->actingAs($user)->postJson('v2/road_patrols/operator/store', $attributes);
|
||||
|
||||
$response->assertOk();
|
||||
|
||||
$this->assertDatabaseHas('road_patrols', [
|
||||
'start_lat' => 12,
|
||||
'start_lon' => 12,
|
||||
'end_lat' => 13,
|
||||
'end_lon' => 13,
|
||||
'officer_name' => $attributes['officer_name'],
|
||||
'officer_phone_number' => $attributes['officer_phone_number'],
|
||||
'officer_plaque' => $attributes['officer_plaque'],
|
||||
'operator_id' => $user->id,
|
||||
'operator_name' => $user->name,
|
||||
'province_id' => $user->province_id,
|
||||
'province_fa' => $user->province_fa,
|
||||
'city_id' => $user->city_id,
|
||||
'city_fa' => $user->city_fa,
|
||||
'edare_id' => $user->edarate_shahri_id,
|
||||
'edare_name' => $user->edarate_shahri_name,
|
||||
'start_way_id' => 0,
|
||||
'end_way_id' => 0,
|
||||
'status' => 0,
|
||||
'status_fa' => 'در حال بررسی',
|
||||
'start_time' => $attributes['start_time'],
|
||||
'end_time' => $attributes['end_time'],
|
||||
'description' => null,
|
||||
]);
|
||||
|
||||
$this->assertDatabaseHas('observed_items', [
|
||||
'item_id' => $infoItem->item,
|
||||
'item_name' => $infoItem->item_str,
|
||||
'sub_item_id' => $infoItem->sub_item,
|
||||
'sub_item_name' => $infoItem->sub_item_str,
|
||||
'local_name' => $attributes['observed_items'][0]['local_name'],
|
||||
'description' => null,
|
||||
'start_lat' => 12,
|
||||
'start_lon' => 12,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,13 +7,12 @@ use App\Models\Permission;
|
||||
use App\Models\SafetyAndPrivacy;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Tests\TestCase;
|
||||
|
||||
class DeleteTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -7,13 +7,12 @@ use App\Models\Permission;
|
||||
use App\Models\SafetyAndPrivacy;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Tests\TestCase;
|
||||
|
||||
class DetailTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -7,13 +7,12 @@ use App\Models\Permission;
|
||||
use App\Models\SafetyAndPrivacy;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Tests\TestCase;
|
||||
|
||||
class getAllDataToMapTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -11,15 +11,14 @@ use App\Models\Permission;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use App\Services\NominatimService;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Mockery\MockInterface;
|
||||
use Tests\TestCase;
|
||||
|
||||
class operatorFirstStepStoreTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -12,8 +12,7 @@ use App\Models\SafetyAndPrivacy;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use App\Services\NominatimService;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Mockery\MockInterface;
|
||||
@@ -21,7 +20,7 @@ use Tests\TestCase;
|
||||
|
||||
class operatorSecondStepStoreTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -12,8 +12,7 @@ use App\Models\SafetyAndPrivacy;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use App\Services\NominatimService;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Foundation\Testing\DatabaseTruncation;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Mockery\MockInterface;
|
||||
@@ -21,7 +20,7 @@ use Tests\TestCase;
|
||||
|
||||
class operatorThirdStepStoreTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
use DatabaseTruncation;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
namespace Tests;
|
||||
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
use CreatesApplication;
|
||||
use CreatesApplication, WithFaker;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user