diff --git a/tests/.pest/snapshots/Feature/FullTest/export_with_data_set____false__.snap b/tests/.pest/snapshots/Feature/FullTest/export_with_data_set____false__.snap index cd926f4..185915d 100644 --- a/tests/.pest/snapshots/Feature/FullTest/export_with_data_set____false__.snap +++ b/tests/.pest/snapshots/Feature/FullTest/export_with_data_set____false__.snap @@ -1,6 +1,6 @@ [NEWS]:Some 1Some content 1Some extra dataLuke SkywalkerLightsaberSauron]]>Evil Eye -[NEWS]:Some 1Some content 1Some extra dataLuke SkywalkerLightsaberSauron]]>Evil Eye -[NEWS]:Some 1Some content 1Some extra dataLuke SkywalkerLightsaberSauron]]>Evil Eye +[NEWS]:Some 2Some content 2Some extra dataLuke SkywalkerLightsaberSauron]]>Evil Eye +[NEWS]:Some 3Some content 3Some extra dataLuke SkywalkerLightsaberSauron]]>Evil Eye diff --git a/tests/.pest/snapshots/Feature/FullTest/export_with_data_set____true__.snap b/tests/.pest/snapshots/Feature/FullTest/export_with_data_set____true__.snap index 92ff210..531c4b0 100644 --- a/tests/.pest/snapshots/Feature/FullTest/export_with_data_set____true__.snap +++ b/tests/.pest/snapshots/Feature/FullTest/export_with_data_set____true__.snap @@ -16,8 +16,8 @@ - [NEWS]:Some 1 - Some content 1 + [NEWS]:Some 2 + Some content 2 Some extra data @@ -31,8 +31,8 @@ - [NEWS]:Some 1 - Some content 1 + [NEWS]:Some 3 + Some content 3 Some extra data diff --git a/tests/.pest/snapshots/Feature/PartialTest/export_with_data_set____false__.snap b/tests/.pest/snapshots/Feature/PartialTest/export_with_data_set____false__.snap index cd926f4..185915d 100644 --- a/tests/.pest/snapshots/Feature/PartialTest/export_with_data_set____false__.snap +++ b/tests/.pest/snapshots/Feature/PartialTest/export_with_data_set____false__.snap @@ -1,6 +1,6 @@ [NEWS]:Some 1Some content 1Some extra dataLuke SkywalkerLightsaberSauron]]>Evil Eye -[NEWS]:Some 1Some content 1Some extra dataLuke SkywalkerLightsaberSauron]]>Evil Eye -[NEWS]:Some 1Some content 1Some extra dataLuke SkywalkerLightsaberSauron]]>Evil Eye +[NEWS]:Some 2Some content 2Some extra dataLuke SkywalkerLightsaberSauron]]>Evil Eye +[NEWS]:Some 3Some content 3Some extra dataLuke SkywalkerLightsaberSauron]]>Evil Eye diff --git a/tests/.pest/snapshots/Feature/PartialTest/export_with_data_set____true__.snap b/tests/.pest/snapshots/Feature/PartialTest/export_with_data_set____true__.snap index 92ff210..531c4b0 100644 --- a/tests/.pest/snapshots/Feature/PartialTest/export_with_data_set____true__.snap +++ b/tests/.pest/snapshots/Feature/PartialTest/export_with_data_set____true__.snap @@ -16,8 +16,8 @@ - [NEWS]:Some 1 - Some content 1 + [NEWS]:Some 2 + Some content 2 Some extra data @@ -31,8 +31,8 @@ - [NEWS]:Some 1 - Some content 1 + [NEWS]:Some 3 + Some content 3 Some extra data diff --git a/tests/Feature/FullTest.php b/tests/Feature/FullTest.php index 889226b..4fd9723 100644 --- a/tests/Feature/FullTest.php +++ b/tests/Feature/FullTest.php @@ -12,7 +12,7 @@ test('export', function (bool $pretty) { setPrettyXml($pretty); - News::factory()->count(3)->state( + News::factory()->count(3)->sequence( ...NewsFakeData::toArray() )->createMany(); diff --git a/tests/Feature/PartialTest.php b/tests/Feature/PartialTest.php index 61b0933..d9560c6 100644 --- a/tests/Feature/PartialTest.php +++ b/tests/Feature/PartialTest.php @@ -12,11 +12,11 @@ test('export', function (bool $pretty) { setPrettyXml($pretty); - News::factory()->count(5)->state(fn () => [ + News::factory()->count(5)->sequence(fn () => [ 'updated_at' => fake()->dateTimeBetween(endDate: '-1 month'), ])->createMany(); - News::factory()->count(3)->state( + News::factory()->count(3)->sequence( ...NewsFakeData::toArray() )->createMany(); diff --git a/workbench/database/factories/NewsFactory.php b/workbench/database/factories/NewsFactory.php index 47d2227..0393aa2 100644 --- a/workbench/database/factories/NewsFactory.php +++ b/workbench/database/factories/NewsFactory.php @@ -13,7 +13,7 @@ class NewsFactory extends Factory public function definition(): array { return [ - 'title' => fake()->text(100), + 'title' => fake()->unique()->word(), 'content' => fake()->text(), ]; }