Skip to content

Commit ff75884

Browse files
committed
Stop using randomDigitNotZero() formatter
1 parent 159b36a commit ff75884

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

database/factories/FeatureFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function definition()
2020
return [
2121
'consumable' => $this->faker->boolean(),
2222
'name' => $this->faker->words(asText: true),
23-
'periodicity' => $this->faker->randomDigitNotZero(),
23+
'periodicity' => $this->faker->randomDigitNotNull(),
2424
'periodicity_type' => $this->faker->randomElement([
2525
PeriodicityType::Year,
2626
PeriodicityType::Month,

database/factories/PlanFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function definition()
1919
{
2020
return [
2121
'name' => $this->faker->words(asText: true),
22-
'periodicity' => $this->faker->randomDigitNotZero(),
22+
'periodicity' => $this->faker->randomDigitNotNull(),
2323
'periodicity_type' => $this->faker->randomElement([
2424
PeriodicityType::Year,
2525
PeriodicityType::Month,

tests/Models/Concerns/HasSubscriptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public function testModelHasSubscriptionRenewals()
301301
->for($subscriber, 'subscriber')
302302
->createOne();
303303

304-
$renewalsCount = $this->faker->randomDigitNotZero();
304+
$renewalsCount = $this->faker->randomDigitNotNull();
305305
$renewals = SubscriptionRenewal::factory()
306306
->times($renewalsCount)
307307
->for($subscription)

tests/Models/FeatureTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function testModelCalculateYearlyExpiration()
1818
{
1919
Carbon::setTestNow(now());
2020

21-
$years = $this->faker->randomDigitNotZero();
21+
$years = $this->faker->randomDigitNotNull();
2222
$feature = Feature::factory()->create([
2323
'periodicity_type' => PeriodicityType::Year,
2424
'periodicity' => $years,
@@ -31,7 +31,7 @@ public function testModelCalculateMonthlyExpiration()
3131
{
3232
Carbon::setTestNow(now());
3333

34-
$months = $this->faker->randomDigitNotZero();
34+
$months = $this->faker->randomDigitNotNull();
3535
$feature = Feature::factory()->create([
3636
'periodicity_type' => PeriodicityType::Month,
3737
'periodicity' => $months,
@@ -44,7 +44,7 @@ public function testModelCalculateWeeklyExpiration()
4444
{
4545
Carbon::setTestNow(now());
4646

47-
$weeks = $this->faker->randomDigitNotZero();
47+
$weeks = $this->faker->randomDigitNotNull();
4848
$feature = Feature::factory()->create([
4949
'periodicity_type' => PeriodicityType::Week,
5050
'periodicity' => $weeks,
@@ -57,7 +57,7 @@ public function testModelCalculateDailyExpiration()
5757
{
5858
Carbon::setTestNow(now());
5959

60-
$days = $this->faker->randomDigitNotZero();
60+
$days = $this->faker->randomDigitNotNull();
6161
$feature = Feature::factory()->create([
6262
'periodicity_type' => PeriodicityType::Day,
6363
'periodicity' => $days,

tests/Models/PlanTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function testModelCalculateYearlyExpiration()
1818
{
1919
Carbon::setTestNow(now());
2020

21-
$years = $this->faker->randomDigitNotZero();
21+
$years = $this->faker->randomDigitNotNull();
2222
$plan = Plan::factory()->create([
2323
'periodicity_type' => PeriodicityType::Year,
2424
'periodicity' => $years,
@@ -31,7 +31,7 @@ public function testModelCalculateMonthlyExpiration()
3131
{
3232
Carbon::setTestNow(now());
3333

34-
$months = $this->faker->randomDigitNotZero();
34+
$months = $this->faker->randomDigitNotNull();
3535
$plan = Plan::factory()->create([
3636
'periodicity_type' => PeriodicityType::Month,
3737
'periodicity' => $months,
@@ -44,7 +44,7 @@ public function testModelCalculateWeeklyExpiration()
4444
{
4545
Carbon::setTestNow(now());
4646

47-
$weeks = $this->faker->randomDigitNotZero();
47+
$weeks = $this->faker->randomDigitNotNull();
4848
$plan = Plan::factory()->create([
4949
'periodicity_type' => PeriodicityType::Week,
5050
'periodicity' => $weeks,
@@ -57,7 +57,7 @@ public function testModelCalculateDailyExpiration()
5757
{
5858
Carbon::setTestNow(now());
5959

60-
$days = $this->faker->randomDigitNotZero();
60+
$days = $this->faker->randomDigitNotNull();
6161
$plan = Plan::factory()->create([
6262
'periodicity_type' => PeriodicityType::Day,
6363
'periodicity' => $days,

0 commit comments

Comments
 (0)