diff --git a/app/Console/Commands/CreateSingleAccount.php b/app/Console/Commands/CreateSingleAccount.php index 5708bf934e83..7b72ce52c130 100644 --- a/app/Console/Commands/CreateSingleAccount.php +++ b/app/Console/Commands/CreateSingleAccount.php @@ -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; diff --git a/app/Console/Commands/CreateTestData.php b/app/Console/Commands/CreateTestData.php index 390717175a15..866c3588ccfe 100644 --- a/app/Console/Commands/CreateTestData.php +++ b/app/Console/Commands/CreateTestData.php @@ -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(); diff --git a/app/Console/Commands/DemoMode.php b/app/Console/Commands/DemoMode.php index d2cc795c0d3e..d667278877ee 100644 --- a/app/Console/Commands/DemoMode.php +++ b/app/Console/Commands/DemoMode.php @@ -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(); diff --git a/app/Console/Commands/SendTestEmails.php b/app/Console/Commands/SendTestEmails.php index e47ec4c8a420..d8b27410caa4 100644 --- a/app/Console/Commands/SendTestEmails.php +++ b/app/Console/Commands/SendTestEmails.php @@ -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', ]); diff --git a/database/factories/ClientContactFactory.php b/database/factories/ClientContactFactory.php index 18e9360c53d4..a27da4b84e98 100644 --- a/database/factories/ClientContactFactory.php +++ b/database/factories/ClientContactFactory.php @@ -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), diff --git a/database/factories/ClientFactory.php b/database/factories/ClientFactory.php index 0db9cb41ca95..283848640166 100644 --- a/database/factories/ClientFactory.php +++ b/database/factories/ClientFactory.php @@ -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), diff --git a/database/factories/CompanyFactory.php b/database/factories/CompanyFactory.php index 7be84adec888..75952d9e0ed7 100644 --- a/database/factories/CompanyFactory.php +++ b/database/factories/CompanyFactory.php @@ -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, diff --git a/database/factories/InvoiceFactory.php b/database/factories/InvoiceFactory.php index c4144c811989..d56551bdeaa0 100644 --- a/database/factories/InvoiceFactory.php +++ b/database/factories/InvoiceFactory.php @@ -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), diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 764ad3804818..30f0d04c5b58 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -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 diff --git a/database/factories/VendorContactFactory.php b/database/factories/VendorContactFactory.php index 6e9d8eca7587..77fb38c21e31 100644 --- a/database/factories/VendorContactFactory.php +++ b/database/factories/VendorContactFactory.php @@ -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(), ]; } } diff --git a/database/factories/VendorFactory.php b/database/factories/VendorFactory.php index d8f9e0eac930..b954cd12353d 100644 --- a/database/factories/VendorFactory.php +++ b/database/factories/VendorFactory.php @@ -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), diff --git a/database/seeders/RandomDataSeeder.php b/database/seeders/RandomDataSeeder.php index 5290a26e9a61..0571c5d39c4a 100644 --- a/database/seeders/RandomDataSeeder.php +++ b/database/seeders/RandomDataSeeder.php @@ -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')), diff --git a/database/seeders/UsersTableSeeder.php b/database/seeders/UsersTableSeeder.php index 7563a8d3cf6b..4366d31bc7ec 100644 --- a/database/seeders/UsersTableSeeder.php +++ b/database/seeders/UsersTableSeeder.php @@ -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')), diff --git a/tests/Browser/ClientPortal/ProfileSettingsTest.php b/tests/Browser/ClientPortal/ProfileSettingsTest.php index 082022c33947..7ef244eaf73b 100644 --- a/tests/Browser/ClientPortal/ProfileSettingsTest.php +++ b/tests/Browser/ClientPortal/ProfileSettingsTest.php @@ -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) { diff --git a/tests/Feature/Client/ClientMergeTest.php b/tests/Feature/Client/ClientMergeTest.php index 01c2a15f67eb..06f155e92129 100644 --- a/tests/Feature/Client/ClientMergeTest.php +++ b/tests/Feature/Client/ClientMergeTest.php @@ -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([ diff --git a/tests/Feature/ClientApiTest.php b/tests/Feature/ClientApiTest.php index 923828ca1d45..78f35182ee7c 100644 --- a/tests/Feature/ClientApiTest.php +++ b/tests/Feature/ClientApiTest.php @@ -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', ]; diff --git a/tests/Feature/ClientPortal/CreditsTest.php b/tests/Feature/ClientPortal/CreditsTest.php index 701e25c5578c..166358efd2e1 100644 --- a/tests/Feature/ClientPortal/CreditsTest.php +++ b/tests/Feature/ClientPortal/CreditsTest.php @@ -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]); diff --git a/tests/Feature/ClientPortal/InvoicesTest.php b/tests/Feature/ClientPortal/InvoicesTest.php index 8e1b76a0d19d..fcffd4222770 100644 --- a/tests/Feature/ClientPortal/InvoicesTest.php +++ b/tests/Feature/ClientPortal/InvoicesTest.php @@ -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]); diff --git a/tests/Feature/ClientTest.php b/tests/Feature/ClientTest.php index 60bc1093bb94..0065d5056a27 100644 --- a/tests/Feature/ClientTest.php +++ b/tests/Feature/ClientTest.php @@ -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', diff --git a/tests/Feature/CompanyTokenApiTest.php b/tests/Feature/CompanyTokenApiTest.php index 994ab6d1f469..fba2bfb57071 100644 --- a/tests/Feature/CompanyTokenApiTest.php +++ b/tests/Feature/CompanyTokenApiTest.php @@ -66,7 +66,7 @@ class CompanyTokenApiTest extends TestCase $this->withoutMiddleware(PasswordProtection::class); $data = [ - 'name' => $this->faker->firstName, + 'name' => $this->faker->firstName(), ]; $response = $this->withHeaders([ diff --git a/tests/Feature/DesignApiTest.php b/tests/Feature/DesignApiTest.php index ac6ceb2288ce..8679d6a121e1 100644 --- a/tests/Feature/DesignApiTest.php +++ b/tests/Feature/DesignApiTest.php @@ -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, ]; diff --git a/tests/Feature/ExpenseApiTest.php b/tests/Feature/ExpenseApiTest.php index 875b529a35a9..a0c3403edebb 100644 --- a/tests/Feature/ExpenseApiTest.php +++ b/tests/Feature/ExpenseApiTest.php @@ -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([ diff --git a/tests/Feature/ExpenseCategoryApiTest.php b/tests/Feature/ExpenseCategoryApiTest.php index 00b46f813b63..f34190182480 100644 --- a/tests/Feature/ExpenseCategoryApiTest.php +++ b/tests/Feature/ExpenseCategoryApiTest.php @@ -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([ diff --git a/tests/Feature/Export/ProfitAndLossReportTest.php b/tests/Feature/Export/ProfitAndLossReportTest.php index 0e90daed3e1f..f48c854f76fd 100644 --- a/tests/Feature/Export/ProfitAndLossReportTest.php +++ b/tests/Feature/Export/ProfitAndLossReportTest.php @@ -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(); diff --git a/tests/Feature/LoadTest.php b/tests/Feature/LoadTest.php index 509190ff88c4..2c00c0088939 100644 --- a/tests/Feature/LoadTest.php +++ b/tests/Feature/LoadTest.php @@ -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(); diff --git a/tests/Feature/MultiPaymentDeleteTest.php b/tests/Feature/MultiPaymentDeleteTest.php index da32c9bed5d2..1a2ba5ea6dd3 100644 --- a/tests/Feature/MultiPaymentDeleteTest.php +++ b/tests/Feature/MultiPaymentDeleteTest.php @@ -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); diff --git a/tests/Feature/ProjectApiTest.php b/tests/Feature/ProjectApiTest.php index 3e680b1c0a04..b0673481a7c4 100644 --- a/tests/Feature/ProjectApiTest.php +++ b/tests/Feature/ProjectApiTest.php @@ -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', ]; diff --git a/tests/Feature/TaskApiTest.php b/tests/Feature/TaskApiTest.php index 4721c15799e0..87d459be4b12 100644 --- a/tests/Feature/TaskApiTest.php +++ b/tests/Feature/TaskApiTest.php @@ -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([ diff --git a/tests/Feature/TaskStatusApiTest.php b/tests/Feature/TaskStatusApiTest.php index 08b45948317d..b70f3c7f6a92 100644 --- a/tests/Feature/TaskStatusApiTest.php +++ b/tests/Feature/TaskStatusApiTest.php @@ -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([ diff --git a/tests/Feature/TaxRateApiTest.php b/tests/Feature/TaxRateApiTest.php index 08eeac71b8c6..e98728a5c100 100644 --- a/tests/Feature/TaxRateApiTest.php +++ b/tests/Feature/TaxRateApiTest.php @@ -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([ diff --git a/tests/Feature/VendorApiTest.php b/tests/Feature/VendorApiTest.php index fa1cbb6db064..b792c1e239c5 100644 --- a/tests/Feature/VendorApiTest.php +++ b/tests/Feature/VendorApiTest.php @@ -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', ]; diff --git a/tests/Integration/EventTest.php b/tests/Integration/EventTest.php index 88e19d7f383f..6653929a41a4 100644 --- a/tests/Integration/EventTest.php +++ b/tests/Integration/EventTest.php @@ -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([ diff --git a/tests/MockUnitData.php b/tests/MockUnitData.php index 371f8fcf8a39..4ca402d23a6c 100644 --- a/tests/MockUnitData.php +++ b/tests/MockUnitData.php @@ -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([ diff --git a/tests/Unit/ClientSettingsTest.php b/tests/Unit/ClientSettingsTest.php index 498a66d4e992..bf53503d1191 100644 --- a/tests/Unit/ClientSettingsTest.php +++ b/tests/Unit/ClientSettingsTest.php @@ -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', diff --git a/tests/Unit/EntityTranslationTest.php b/tests/Unit/EntityTranslationTest.php index b807b4990653..3e5548bd2453 100644 --- a/tests/Unit/EntityTranslationTest.php +++ b/tests/Unit/EntityTranslationTest.php @@ -57,7 +57,7 @@ class EntityTranslationTest extends TestCase ]); $u = User::factory()->create([ - 'email' => $this->faker->email, + 'email' => $this->faker->email(), 'account_id' => $account->id, ]); diff --git a/tests/Unit/FactoryCreationTest.php b/tests/Unit/FactoryCreationTest.php index 7530f0f609c7..f4fc6e1f6365 100644 --- a/tests/Unit/FactoryCreationTest.php +++ b/tests/Unit/FactoryCreationTest.php @@ -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); diff --git a/tests/Unit/RecurringExpenseCloneTest.php b/tests/Unit/RecurringExpenseCloneTest.php index 61a5e91b909c..d2d446ca56e3 100644 --- a/tests/Unit/RecurringExpenseCloneTest.php +++ b/tests/Unit/RecurringExpenseCloneTest.php @@ -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([