Use Faker methods

Accessing Faker properties was deprecated in Faker 1.14.
This commit is contained in:
Shift 2022-06-21 09:59:36 +00:00
parent 0a20889916
commit 06d910a53b
No known key found for this signature in database
GPG Key ID: 5A96F038425C5A1C
37 changed files with 146 additions and 146 deletions

View File

@ -429,7 +429,7 @@ class CreateSingleAccount extends Command
$invoice->tax_rate3 = 5;
}
$invoice->custom_value1 = $faker->date;
$invoice->custom_value1 = $faker->date();
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
$invoice->save();
@ -827,7 +827,7 @@ class CreateSingleAccount extends Command
$invoice->tax_rate3 = 5;
}
$invoice->custom_value1 = $faker->date;
$invoice->custom_value1 = $faker->date();
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
$invoice->status_id = RecurringInvoice::STATUS_ACTIVE;

View File

@ -517,7 +517,7 @@ class CreateTestData extends Command
$invoice->tax_rate3 = 5;
}
$invoice->custom_value1 = $faker->date;
$invoice->custom_value1 = $faker->date();
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
$invoice->save();

View File

@ -137,15 +137,15 @@ class DemoMode extends Command
$settings = $company->settings;
$settings->name = $faker->company;
$settings->address1 = $faker->buildingNumber;
$settings->address2 = $faker->streetAddress;
$settings->city = $faker->city;
$settings->state = $faker->state;
$settings->postal_code = $faker->postcode;
$settings->website = $faker->url;
$settings->name = $faker->company();
$settings->address1 = $faker->buildingNumber();
$settings->address2 = $faker->streetAddress();
$settings->city = $faker->city();
$settings->state = $faker->state();
$settings->postal_code = $faker->postcode();
$settings->website = $faker->url();
$settings->vat_number = (string) $faker->numberBetween(123456789, 987654321);
$settings->phone = (string) $faker->phoneNumber;
$settings->phone = (string) $faker->phoneNumber();
$company->settings = $settings;
$company->save();
@ -395,7 +395,7 @@ class DemoMode extends Command
// $invoice->tax_rate3 = 5;
// }
// $invoice->custom_value1 = $faker->date;
// $invoice->custom_value1 = $faker->date();
// $invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
$invoice->save();
@ -462,7 +462,7 @@ class DemoMode extends Command
// $invoice->tax_rate3 = 5;
// }
// $invoice->custom_value1 = $faker->date;
// $invoice->custom_value1 = $faker->date();
// $invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
$invoice->save();

View File

@ -70,7 +70,7 @@ class SendTestEmails extends Command
$user = User::factory()->create([
'account_id' => $account->id,
'confirmation_code' => '123',
'email' => $faker->safeEmail,
'email' => $faker->safeEmail(),
'first_name' => 'John',
'last_name' => 'Doe',
]);

View File

@ -31,11 +31,11 @@ class ClientContactFactory extends Factory
public function definition()
{
return [
'first_name' => $this->faker->firstName,
'last_name' => $this->faker->lastName,
'phone' => $this->faker->phoneNumber,
'first_name' => $this->faker->firstName(),
'last_name' => $this->faker->lastName(),
'phone' => $this->faker->phoneNumber(),
'email_verified_at' => now(),
'email' => $this->faker->unique()->safeEmail,
'email' => $this->faker->unique()->safeEmail(),
'send_email' => true,
'password' => bcrypt('password'),
'remember_token' => \Illuminate\Support\Str::random(10),

View File

@ -33,7 +33,7 @@ class ClientFactory extends Factory
{
return [
'name' => $this->faker->company(),
'website' => $this->faker->url,
'website' => $this->faker->url(),
'private_notes' => $this->faker->text(200),
'balance' => 0,
'paid_to_date' => 0,
@ -43,17 +43,17 @@ class ClientFactory extends Factory
'custom_value2' => '',
'custom_value3' => '',
'custom_value4' => '',
'address1' => $this->faker->buildingNumber,
'address2' => $this->faker->streetAddress,
'city' => $this->faker->city,
'state' => $this->faker->state,
'postal_code' => $this->faker->postcode,
'address1' => $this->faker->buildingNumber(),
'address2' => $this->faker->streetAddress(),
'city' => $this->faker->city(),
'state' => $this->faker->state(),
'postal_code' => $this->faker->postcode(),
'country_id' => 4,
'shipping_address1' => $this->faker->buildingNumber,
'shipping_address2' => $this->faker->streetAddress,
'shipping_city' => $this->faker->city,
'shipping_state' => $this->faker->state,
'shipping_postal_code' => $this->faker->postcode,
'shipping_address1' => $this->faker->buildingNumber(),
'shipping_address2' => $this->faker->streetAddress(),
'shipping_city' => $this->faker->city(),
'shipping_state' => $this->faker->state(),
'shipping_postal_code' => $this->faker->postcode(),
'shipping_country_id' => 4,
'settings' => ClientSettings::defaults(),
'client_hash' => \Illuminate\Support\Str::random(40),

View File

@ -35,9 +35,9 @@ class CompanyFactory extends Factory
public function definition()
{
return [
//'name' => $this->faker->name,
//'name' => $this->faker->name(),
'company_key' => strtolower(\Illuminate\Support\Str::random(config('ninja.key_length'))),
'ip' => $this->faker->ipv4,
'ip' => $this->faker->ipv4(),
'db' => config('database.default'),
'settings' => CompanySettings::defaults(),
'is_large' => false,

View File

@ -42,7 +42,7 @@ class InvoiceFactory extends Factory
'tax_rate2' => 17.5,
//'tax_name3' => 'THIRDTAX',
//'tax_rate3' => 5,
// 'custom_value1' => $this->faker->date,
// 'custom_value1' => $this->faker->date(),
//'custom_value2' => rand(0, 1) ? 'yes' : 'no',
// 'custom_value3' => $this->faker->numberBetween(1,4),
// 'custom_value4' => $this->faker->numberBetween(1,4),

View File

@ -31,9 +31,9 @@ class UserFactory extends Factory
public function definition()
{
return [
'first_name' => $this->faker->name,
'last_name' => $this->faker->name,
'phone' => $this->faker->phoneNumber,
'first_name' => $this->faker->name(),
'last_name' => $this->faker->name(),
'phone' => $this->faker->phoneNumber(),
'email' => config('ninja.testvars.username'),
'email_verified_at' => now(),
'password' => bcrypt(config('ninja.testvars.password')), // secret

View File

@ -31,10 +31,10 @@ class VendorContactFactory extends Factory
public function definition()
{
return [
'first_name' => $this->faker->firstName,
'last_name' => $this->faker->lastName,
'phone' => $this->faker->phoneNumber,
'email' => $this->faker->unique()->safeEmail,
'first_name' => $this->faker->firstName(),
'last_name' => $this->faker->lastName(),
'phone' => $this->faker->phoneNumber(),
'email' => $this->faker->unique()->safeEmail(),
];
}
}

View File

@ -33,7 +33,7 @@ class VendorFactory extends Factory
{
return [
'name' => $this->faker->name(),
'website' => $this->faker->url,
'website' => $this->faker->url(),
'private_notes' => $this->faker->text(200),
'vat_number' => $this->faker->text(25),
'id_number' => $this->faker->text(20),
@ -41,11 +41,11 @@ class VendorFactory extends Factory
'custom_value2' => $this->faker->text(20),
'custom_value3' => $this->faker->text(20),
'custom_value4' => $this->faker->text(20),
'address1' => $this->faker->buildingNumber,
'address2' => $this->faker->streetAddress,
'city' => $this->faker->city,
'state' => $this->faker->state,
'postal_code' => $this->faker->postcode,
'address1' => $this->faker->buildingNumber(),
'address2' => $this->faker->streetAddress(),
'city' => $this->faker->city(),
'state' => $this->faker->state(),
'postal_code' => $this->faker->postcode(),
'country_id' => 4,
'vendor_hash' => Str::random(40),

View File

@ -95,7 +95,7 @@ class RandomDataSeeder extends Seeder
$account->save();
$user = User::factory()->create([
'email' => $faker->freeEmail,
'email' => $faker->freeEmail(),
'account_id' => $account->id,
'confirmation_code' => $this->createDbHash(config('database.default')),
]);
@ -153,8 +153,8 @@ class RandomDataSeeder extends Seeder
]);
ClientContact::create([
'first_name' => $faker->firstName,
'last_name' => $faker->lastName,
'first_name' => $faker->firstName(),
'last_name' => $faker->lastName(),
'email' => config('ninja.testvars.username'),
'company_id' => $company->id,
'password' => Hash::make(config('ninja.testvars.password')),

View File

@ -75,8 +75,8 @@ class UsersTableSeeder extends Seeder
]);
ClientContact::create([
'first_name' => $faker->firstName,
'last_name' => $faker->lastName,
'first_name' => $faker->firstName(),
'last_name' => $faker->lastName(),
'email' => config('ninja.testvars.clientname'),
'company_id' => $company->id,
'password' => Hash::make(config('ninja.testvars.password')),

View File

@ -46,10 +46,10 @@ class ProfileSettingsTest extends DuskTestCase
public function testClientDetailsUpdate()
{
$original = [
'name' => $this->faker->name,
'name' => $this->faker->name(),
'vat_number' => (string) $this->faker->randomNumber(6),
'phone' => $this->faker->phoneNumber,
'website' => $this->faker->url,
'phone' => $this->faker->phoneNumber(),
'website' => $this->faker->url(),
];
$this->browse(function (Browser $browser) use ($original) {
@ -85,10 +85,10 @@ class ProfileSettingsTest extends DuskTestCase
public function testContactDetailsUpdate()
{
$original = [
'first_name' => $this->faker->firstName,
'last_name' => $this->faker->lastName,
'first_name' => $this->faker->firstName(),
'last_name' => $this->faker->lastName(),
'email_address' => 'user@example.com',
'phone' => $this->faker->phoneNumber,
'phone' => $this->faker->phoneNumber(),
];
$this->browse(function (Browser $browser) use ($original) {
@ -125,11 +125,11 @@ class ProfileSettingsTest extends DuskTestCase
public function testBillingAddressUpdate()
{
$original = [
'street' => $this->faker->streetName,
'apt' => $this->faker->streetAddress,
'city' => $this->faker->city,
'state' => $this->faker->state,
'postal_code' => $this->faker->postcode,
'street' => $this->faker->streetName(),
'apt' => $this->faker->streetAddress(),
'city' => $this->faker->city(),
'state' => $this->faker->state(),
'postal_code' => $this->faker->postcode(),
];
$this->browse(function (Browser $browser) use ($original) {
@ -168,11 +168,11 @@ class ProfileSettingsTest extends DuskTestCase
public function testShippingAddressUpdate()
{
$original = [
'street' => $this->faker->streetName,
'apt' => $this->faker->streetAddress,
'city' => $this->faker->city,
'state' => $this->faker->state,
'postal_code' => $this->faker->postcode,
'street' => $this->faker->streetName(),
'apt' => $this->faker->streetAddress(),
'city' => $this->faker->city(),
'state' => $this->faker->state(),
'postal_code' => $this->faker->postcode(),
];
$this->browse(function (Browser $browser) use ($original) {

View File

@ -56,7 +56,7 @@ class ClientMergeTest extends TestCase
$this->user = User::factory()->create([
'account_id' => $account->id,
'email' => $this->faker->safeEmail,
'email' => $this->faker->safeEmail(),
]);
$this->company = Company::factory()->create([
@ -104,7 +104,7 @@ class ClientMergeTest extends TestCase
$user = User::factory()->create([
'account_id' => $account->id,
'email' => $this->faker->safeEmail,
'email' => $this->faker->safeEmail(),
]);
$company = Company::factory()->create([

View File

@ -53,7 +53,7 @@ class ClientApiTest extends TestCase
];
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'settings' => $settings,
];
@ -77,7 +77,7 @@ class ClientApiTest extends TestCase
public function testClientLanguageCodeIllegal()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'language_code' => 'not_really_a_VALID-locale',
];
@ -104,7 +104,7 @@ class ClientApiTest extends TestCase
public function testClientLanguageCodeValidationTrue()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'language_code' => 'de',
];
@ -131,7 +131,7 @@ class ClientApiTest extends TestCase
public function testClientCountryCodeValidationTrue()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'country_code' => 'AM',
];
@ -154,7 +154,7 @@ class ClientApiTest extends TestCase
public function testClientNoneValidation()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'number' => '',
];
@ -176,7 +176,7 @@ class ClientApiTest extends TestCase
public function testClientNullValidation()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'number' => null,
];
@ -198,7 +198,7 @@ class ClientApiTest extends TestCase
public function testClientCountryCodeValidationTrueIso3()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'country_code' => 'ARM',
];
@ -221,7 +221,7 @@ class ClientApiTest extends TestCase
public function testClientCountryCodeValidationFalse()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'country_code' => 'AdfdfdfM',
];
@ -237,7 +237,7 @@ class ClientApiTest extends TestCase
public function testClientPost()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -251,7 +251,7 @@ class ClientApiTest extends TestCase
public function testDuplicateNumberCatch()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'number' => 'iamaduplicate',
];
@ -273,7 +273,7 @@ class ClientApiTest extends TestCase
public function testClientPut()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
];
@ -372,7 +372,7 @@ class ClientApiTest extends TestCase
public function testClientCurrencyCodeValidationTrue()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'currency_code' => 'USD',
];
@ -388,7 +388,7 @@ class ClientApiTest extends TestCase
public function testClientCurrencyCodeValidationFalse()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'currency_code' => 'R',
];

View File

@ -46,7 +46,7 @@ class CreditsTest extends TestCase
$account = Account::factory()->create();
$user = User::factory()->create(
['account_id' => $account->id, 'email' => $this->faker->safeEmail]
['account_id' => $account->id, 'email' => $this->faker->safeEmail()]
);
$company = Company::factory()->create(['account_id' => $account->id]);
@ -111,7 +111,7 @@ class CreditsTest extends TestCase
$account = Account::factory()->create();
$user = User::factory()->create(
['account_id' => $account->id, 'email' => $this->faker->safeEmail]
['account_id' => $account->id, 'email' => $this->faker->safeEmail()]
);
$company = Company::factory()->create(['account_id' => $account->id]);

View File

@ -44,7 +44,7 @@ class InvoicesTest extends TestCase
$account = Account::factory()->create();
$user = User::factory()->create(
['account_id' => $account->id, 'email' => $this->faker->safeEmail]
['account_id' => $account->id, 'email' => $this->faker->safeEmail()]
);
$company = Company::factory()->create(['account_id' => $account->id]);

View File

@ -305,7 +305,7 @@ class ClientTest extends TestCase
$data = [
'name' => 'A loyal Client',
'contacts' => $this->faker->unique()->safeEmail,
'contacts' => $this->faker->unique()->safeEmail(),
];
try {
@ -360,7 +360,7 @@ class ClientTest extends TestCase
$data = [
'name' => 'A loyal Client',
'contacts' => [
['email' => $this->faker->unique()->safeEmail],
['email' => $this->faker->unique()->safeEmail()],
],
];
@ -376,7 +376,7 @@ class ClientTest extends TestCase
'name' => 'A loyal Client',
'contacts' => [
[
'email' => $this->faker->unique()->safeEmail,
'email' => $this->faker->unique()->safeEmail(),
'password' => '*****',
],
],
@ -392,7 +392,7 @@ class ClientTest extends TestCase
'name' => 'A loyal Client',
'contacts' => [
[
'email' => $this->faker->unique()->safeEmail,
'email' => $this->faker->unique()->safeEmail(),
'password' => '1',
],
],
@ -414,7 +414,7 @@ class ClientTest extends TestCase
'name' => 'A loyal Client',
'contacts' => [
[
'email' => $this->faker->unique()->safeEmail,
'email' => $this->faker->unique()->safeEmail(),
'password' => '1Qajsj...33',
],
],
@ -437,11 +437,11 @@ class ClientTest extends TestCase
'name' => 'A loyal Client',
'contacts' => [
[
'email' => $this->faker->unique()->safeEmail,
'email' => $this->faker->unique()->safeEmail(),
'password' => '1Qajsj...33',
],
[
'email' => $this->faker->unique()->safeEmail,
'email' => $this->faker->unique()->safeEmail(),
'password' => '1234AAAAAaaaaa',
],
],
@ -472,7 +472,7 @@ class ClientTest extends TestCase
$arr = $response->json();
$safe_email = $this->faker->unique()->safeEmail;
$safe_email = $this->faker->unique()->safeEmail();
$data = [
'name' => 'A loyal Client',
@ -506,7 +506,7 @@ class ClientTest extends TestCase
$this->assertEquals(0, strlen($contact->password));
$safe_email = $this->faker->unique()->safeEmail;
$safe_email = $this->faker->unique()->safeEmail();
$data = [
'name' => 'A loyal Client',

View File

@ -66,7 +66,7 @@ class CompanyTokenApiTest extends TestCase
$this->withoutMiddleware(PasswordProtection::class);
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([

View File

@ -56,7 +56,7 @@ class DesignApiTest extends TestCase
];
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'design' => $design,
];
@ -94,7 +94,7 @@ class DesignApiTest extends TestCase
$this->assertEquals($this->id, $arr['data']['id']);
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'design' => $design,
];
@ -137,7 +137,7 @@ class DesignApiTest extends TestCase
];
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'design' => $design,
];

View File

@ -44,7 +44,7 @@ class ExpenseApiTest extends TestCase
public function testExpensePost()
{
$data = [
'public_notes' => $this->faker->firstName,
'public_notes' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -61,7 +61,7 @@ class ExpenseApiTest extends TestCase
public function testDuplicateNumberCatch()
{
$data = [
'public_notes' => $this->faker->firstName,
'public_notes' => $this->faker->firstName(),
'number' => 'iamaduplicate',
];
@ -83,7 +83,7 @@ class ExpenseApiTest extends TestCase
public function testExpensePut()
{
$data = [
'public_notes' => $this->faker->firstName,
'public_notes' => $this->faker->firstName(),
'number' => 'Coolio',
];
@ -192,7 +192,7 @@ class ExpenseApiTest extends TestCase
public function testAddingExpense()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([

View File

@ -44,7 +44,7 @@ class ExpenseCategoryApiTest extends TestCase
public function testExpenseCategoryPost()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -58,7 +58,7 @@ class ExpenseCategoryApiTest extends TestCase
public function testExpenseCategoryPut()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([

View File

@ -94,7 +94,7 @@ class ProfitAndLossReportTest extends TestCase
$this->user = User::factory()->create([
'account_id' => $this->account->id,
'confirmation_code' => 'xyz123',
'email' => $this->faker->unique()->safeEmail,
'email' => $this->faker->unique()->safeEmail(),
]);
$settings = CompanySettings::defaults();

View File

@ -287,7 +287,7 @@ class LoadTest extends TestCase
$invoice->tax_rate3 = 5;
}
$invoice->custom_value1 = $faker->date;
$invoice->custom_value1 = $faker->date();
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
$invoice->save();

View File

@ -57,7 +57,7 @@ class MultiPaymentDeleteTest extends TestCase
$user = User::factory()->create([
'account_id' => $account->id,
'confirmation_code' => '11',
'email' => $this->faker->unique()->safeEmail,
'email' => $this->faker->unique()->safeEmail(),
]);
$cu = CompanyUserFactory::create($user->id, $company->id, $account->id);

View File

@ -55,7 +55,7 @@ class ProjectApiTest extends TestCase
public function testProjectPost()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'client_id' => $this->client->hashed_id,
'number' => 'duplicate',
];
@ -111,7 +111,7 @@ class ProjectApiTest extends TestCase
public function testProjectPut()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'public_notes' => 'Coolio',
];

View File

@ -74,7 +74,7 @@ class TaskApiTest extends TestCase
public function testTaskPost()
{
$data = [
'description' => $this->faker->firstName,
'description' => $this->faker->firstName(),
'number' => 'taskynumber',
];
@ -113,7 +113,7 @@ class TaskApiTest extends TestCase
public function testTaskPostNoDefinedTaskNumber()
{
$data = [
'description' => $this->faker->firstName,
'description' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -129,7 +129,7 @@ class TaskApiTest extends TestCase
public function testTaskPostWithActionStart()
{
$data = [
'description' => $this->faker->firstName,
'description' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -144,7 +144,7 @@ class TaskApiTest extends TestCase
public function testTaskPut()
{
$data = [
'description' => $this->faker->firstName,
'description' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -238,7 +238,7 @@ class TaskApiTest extends TestCase
public function testTaskPostWithStartAction()
{
$data = [
'description' => $this->faker->firstName,
'description' => $this->faker->firstName(),
'number' => 'taskynumber2',
];
@ -257,7 +257,7 @@ class TaskApiTest extends TestCase
public function testTaskPostWithStopAction()
{
$data = [
'description' => $this->faker->firstName,
'description' => $this->faker->firstName(),
];
$response = $this->withHeaders([

View File

@ -44,7 +44,7 @@ class TaskStatusApiTest extends TestCase
public function testTaskStatusPost()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -58,7 +58,7 @@ class TaskStatusApiTest extends TestCase
public function testTaskStatusPut()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([

View File

@ -44,7 +44,7 @@ class TaxRateApiTest extends TestCase
public function testTaxRatePost()
{
$rate_name = $this->faker->firstName;
$rate_name = $this->faker->firstName();
$data = [
'name' => $rate_name,
@ -85,7 +85,7 @@ class TaxRateApiTest extends TestCase
public function testTaxRatePostWithActionStart()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'rate' => rand(1, 20),
];
@ -101,7 +101,7 @@ class TaxRateApiTest extends TestCase
public function testTaxRatePut()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([

View File

@ -45,7 +45,7 @@ class VendorApiTest extends TestCase
public function testAddVendorToInvoice()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -78,7 +78,7 @@ class VendorApiTest extends TestCase
public function testAddVendorToRecurringInvoice()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -112,7 +112,7 @@ class VendorApiTest extends TestCase
public function testAddVendorToQuote()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -145,7 +145,7 @@ class VendorApiTest extends TestCase
public function testAddVendorToCredit()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -178,7 +178,7 @@ class VendorApiTest extends TestCase
public function testVendorPost()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -192,7 +192,7 @@ class VendorApiTest extends TestCase
public function testVendorPut()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'number' => 'wiggles',
];

View File

@ -119,7 +119,7 @@ class EventTest extends TestCase
]);
$data = [
'public_notes' => $this->faker->firstName,
'public_notes' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -131,7 +131,7 @@ class EventTest extends TestCase
$arr = $response->json();
$data = [
'public_notes' => $this->faker->firstName,
'public_notes' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -174,7 +174,7 @@ class EventTest extends TestCase
]);
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -186,7 +186,7 @@ class EventTest extends TestCase
$arr = $response->json();
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
];
@ -608,7 +608,7 @@ class EventTest extends TestCase
]);
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -620,7 +620,7 @@ class EventTest extends TestCase
$arr = $response->json();
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
];
@ -740,7 +740,7 @@ class EventTest extends TestCase
]);
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([
@ -752,7 +752,7 @@ class EventTest extends TestCase
$arr = $response->json();
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
];
$response = $this->withHeaders([

View File

@ -48,7 +48,7 @@ trait MockUnitData
$this->user = User::factory()->create([
'account_id' => $this->account->id,
'email' => $this->faker->safeEmail,
'email' => $this->faker->safeEmail(),
]);
$this->company = Company::factory()->create([

View File

@ -37,7 +37,7 @@ class ClientSettingsTest extends TestCase
public function testClientBaseline()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
];
@ -63,7 +63,7 @@ class ClientSettingsTest extends TestCase
public function testClientValidSettings()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'settings' => [
'currency_id' => '1',
@ -102,7 +102,7 @@ class ClientSettingsTest extends TestCase
public function testClientIllegalCurrency()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'settings' => [
'currency_id' => 'a',
@ -132,7 +132,7 @@ class ClientSettingsTest extends TestCase
public function testClientIllegalLanguage()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'settings' => [
'currency_id' => '1',
@ -162,7 +162,7 @@ class ClientSettingsTest extends TestCase
public function testClientIllegalPaymenTerms()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'settings' => [
'currency_id' => '1',
@ -192,7 +192,7 @@ class ClientSettingsTest extends TestCase
public function testClientIllegalValidUntil()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'settings' => [
'currency_id' => '1',
@ -222,7 +222,7 @@ class ClientSettingsTest extends TestCase
public function testClientIllegalDefaultTaskRate()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'settings' => [
'currency_id' => '1',
@ -255,7 +255,7 @@ class ClientSettingsTest extends TestCase
public function testClientIllegalSendReminderBool()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'settings' => [
'currency_id' => '1',
@ -285,7 +285,7 @@ class ClientSettingsTest extends TestCase
public function testClientSettingBools()
{
$data = [
'name' => $this->faker->firstName,
'name' => $this->faker->firstName(),
'id_number' => 'Coolio',
'settings' => [
'currency_id' => '1',

View File

@ -57,7 +57,7 @@ class EntityTranslationTest extends TestCase
]);
$u = User::factory()->create([
'email' => $this->faker->email,
'email' => $this->faker->email(),
'account_id' => $account->id,
]);

View File

@ -142,7 +142,7 @@ class FactoryCreationTest extends TestCase
public function testUserCreate()
{
$new_user = UserFactory::create($this->account->id);
$new_user->email = $this->faker->freeEmail;
$new_user->email = $this->faker->freeEmail();
$new_user->save();
$this->assertNotNull($new_user);

View File

@ -37,7 +37,7 @@ class RecurringExpenseCloneTest extends TestCase
public function testBadBase64String()
{
$account = Account::factory()->create();
$user = User::factory()->create(['account_id' => $account->id, 'email' => $this->faker->unique()->safeEmail]);
$user = User::factory()->create(['account_id' => $account->id, 'email' => $this->faker->unique()->safeEmail()]);
$company = Company::factory()->create(['account_id' => $account->id]);
$client = Client::factory()->create([