mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-05 04:34:36 -04:00
Use Faker methods
Accessing Faker properties was deprecated in Faker 1.14.
This commit is contained in:
parent
0a20889916
commit
06d910a53b
@ -429,7 +429,7 @@ class CreateSingleAccount extends Command
|
|||||||
$invoice->tax_rate3 = 5;
|
$invoice->tax_rate3 = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice->custom_value1 = $faker->date;
|
$invoice->custom_value1 = $faker->date();
|
||||||
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
||||||
|
|
||||||
$invoice->save();
|
$invoice->save();
|
||||||
@ -827,7 +827,7 @@ class CreateSingleAccount extends Command
|
|||||||
$invoice->tax_rate3 = 5;
|
$invoice->tax_rate3 = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice->custom_value1 = $faker->date;
|
$invoice->custom_value1 = $faker->date();
|
||||||
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
||||||
|
|
||||||
$invoice->status_id = RecurringInvoice::STATUS_ACTIVE;
|
$invoice->status_id = RecurringInvoice::STATUS_ACTIVE;
|
||||||
|
@ -517,7 +517,7 @@ class CreateTestData extends Command
|
|||||||
$invoice->tax_rate3 = 5;
|
$invoice->tax_rate3 = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice->custom_value1 = $faker->date;
|
$invoice->custom_value1 = $faker->date();
|
||||||
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
||||||
|
|
||||||
$invoice->save();
|
$invoice->save();
|
||||||
|
@ -137,15 +137,15 @@ class DemoMode extends Command
|
|||||||
|
|
||||||
$settings = $company->settings;
|
$settings = $company->settings;
|
||||||
|
|
||||||
$settings->name = $faker->company;
|
$settings->name = $faker->company();
|
||||||
$settings->address1 = $faker->buildingNumber;
|
$settings->address1 = $faker->buildingNumber();
|
||||||
$settings->address2 = $faker->streetAddress;
|
$settings->address2 = $faker->streetAddress();
|
||||||
$settings->city = $faker->city;
|
$settings->city = $faker->city();
|
||||||
$settings->state = $faker->state;
|
$settings->state = $faker->state();
|
||||||
$settings->postal_code = $faker->postcode;
|
$settings->postal_code = $faker->postcode();
|
||||||
$settings->website = $faker->url;
|
$settings->website = $faker->url();
|
||||||
$settings->vat_number = (string) $faker->numberBetween(123456789, 987654321);
|
$settings->vat_number = (string) $faker->numberBetween(123456789, 987654321);
|
||||||
$settings->phone = (string) $faker->phoneNumber;
|
$settings->phone = (string) $faker->phoneNumber();
|
||||||
|
|
||||||
$company->settings = $settings;
|
$company->settings = $settings;
|
||||||
$company->save();
|
$company->save();
|
||||||
@ -395,7 +395,7 @@ class DemoMode extends Command
|
|||||||
// $invoice->tax_rate3 = 5;
|
// $invoice->tax_rate3 = 5;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// $invoice->custom_value1 = $faker->date;
|
// $invoice->custom_value1 = $faker->date();
|
||||||
// $invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
// $invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
||||||
|
|
||||||
$invoice->save();
|
$invoice->save();
|
||||||
@ -462,7 +462,7 @@ class DemoMode extends Command
|
|||||||
// $invoice->tax_rate3 = 5;
|
// $invoice->tax_rate3 = 5;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// $invoice->custom_value1 = $faker->date;
|
// $invoice->custom_value1 = $faker->date();
|
||||||
// $invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
// $invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
||||||
|
|
||||||
$invoice->save();
|
$invoice->save();
|
||||||
|
@ -70,7 +70,7 @@ class SendTestEmails extends Command
|
|||||||
$user = User::factory()->create([
|
$user = User::factory()->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'confirmation_code' => '123',
|
'confirmation_code' => '123',
|
||||||
'email' => $faker->safeEmail,
|
'email' => $faker->safeEmail(),
|
||||||
'first_name' => 'John',
|
'first_name' => 'John',
|
||||||
'last_name' => 'Doe',
|
'last_name' => 'Doe',
|
||||||
]);
|
]);
|
||||||
|
@ -31,11 +31,11 @@ class ClientContactFactory extends Factory
|
|||||||
public function definition()
|
public function definition()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'first_name' => $this->faker->firstName,
|
'first_name' => $this->faker->firstName(),
|
||||||
'last_name' => $this->faker->lastName,
|
'last_name' => $this->faker->lastName(),
|
||||||
'phone' => $this->faker->phoneNumber,
|
'phone' => $this->faker->phoneNumber(),
|
||||||
'email_verified_at' => now(),
|
'email_verified_at' => now(),
|
||||||
'email' => $this->faker->unique()->safeEmail,
|
'email' => $this->faker->unique()->safeEmail(),
|
||||||
'send_email' => true,
|
'send_email' => true,
|
||||||
'password' => bcrypt('password'),
|
'password' => bcrypt('password'),
|
||||||
'remember_token' => \Illuminate\Support\Str::random(10),
|
'remember_token' => \Illuminate\Support\Str::random(10),
|
||||||
|
@ -33,7 +33,7 @@ class ClientFactory extends Factory
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => $this->faker->company(),
|
'name' => $this->faker->company(),
|
||||||
'website' => $this->faker->url,
|
'website' => $this->faker->url(),
|
||||||
'private_notes' => $this->faker->text(200),
|
'private_notes' => $this->faker->text(200),
|
||||||
'balance' => 0,
|
'balance' => 0,
|
||||||
'paid_to_date' => 0,
|
'paid_to_date' => 0,
|
||||||
@ -43,17 +43,17 @@ class ClientFactory extends Factory
|
|||||||
'custom_value2' => '',
|
'custom_value2' => '',
|
||||||
'custom_value3' => '',
|
'custom_value3' => '',
|
||||||
'custom_value4' => '',
|
'custom_value4' => '',
|
||||||
'address1' => $this->faker->buildingNumber,
|
'address1' => $this->faker->buildingNumber(),
|
||||||
'address2' => $this->faker->streetAddress,
|
'address2' => $this->faker->streetAddress(),
|
||||||
'city' => $this->faker->city,
|
'city' => $this->faker->city(),
|
||||||
'state' => $this->faker->state,
|
'state' => $this->faker->state(),
|
||||||
'postal_code' => $this->faker->postcode,
|
'postal_code' => $this->faker->postcode(),
|
||||||
'country_id' => 4,
|
'country_id' => 4,
|
||||||
'shipping_address1' => $this->faker->buildingNumber,
|
'shipping_address1' => $this->faker->buildingNumber(),
|
||||||
'shipping_address2' => $this->faker->streetAddress,
|
'shipping_address2' => $this->faker->streetAddress(),
|
||||||
'shipping_city' => $this->faker->city,
|
'shipping_city' => $this->faker->city(),
|
||||||
'shipping_state' => $this->faker->state,
|
'shipping_state' => $this->faker->state(),
|
||||||
'shipping_postal_code' => $this->faker->postcode,
|
'shipping_postal_code' => $this->faker->postcode(),
|
||||||
'shipping_country_id' => 4,
|
'shipping_country_id' => 4,
|
||||||
'settings' => ClientSettings::defaults(),
|
'settings' => ClientSettings::defaults(),
|
||||||
'client_hash' => \Illuminate\Support\Str::random(40),
|
'client_hash' => \Illuminate\Support\Str::random(40),
|
||||||
|
@ -35,9 +35,9 @@ class CompanyFactory extends Factory
|
|||||||
public function definition()
|
public function definition()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
//'name' => $this->faker->name,
|
//'name' => $this->faker->name(),
|
||||||
'company_key' => strtolower(\Illuminate\Support\Str::random(config('ninja.key_length'))),
|
'company_key' => strtolower(\Illuminate\Support\Str::random(config('ninja.key_length'))),
|
||||||
'ip' => $this->faker->ipv4,
|
'ip' => $this->faker->ipv4(),
|
||||||
'db' => config('database.default'),
|
'db' => config('database.default'),
|
||||||
'settings' => CompanySettings::defaults(),
|
'settings' => CompanySettings::defaults(),
|
||||||
'is_large' => false,
|
'is_large' => false,
|
||||||
|
@ -42,7 +42,7 @@ class InvoiceFactory extends Factory
|
|||||||
'tax_rate2' => 17.5,
|
'tax_rate2' => 17.5,
|
||||||
//'tax_name3' => 'THIRDTAX',
|
//'tax_name3' => 'THIRDTAX',
|
||||||
//'tax_rate3' => 5,
|
//'tax_rate3' => 5,
|
||||||
// 'custom_value1' => $this->faker->date,
|
// 'custom_value1' => $this->faker->date(),
|
||||||
//'custom_value2' => rand(0, 1) ? 'yes' : 'no',
|
//'custom_value2' => rand(0, 1) ? 'yes' : 'no',
|
||||||
// 'custom_value3' => $this->faker->numberBetween(1,4),
|
// 'custom_value3' => $this->faker->numberBetween(1,4),
|
||||||
// 'custom_value4' => $this->faker->numberBetween(1,4),
|
// 'custom_value4' => $this->faker->numberBetween(1,4),
|
||||||
|
@ -31,9 +31,9 @@ class UserFactory extends Factory
|
|||||||
public function definition()
|
public function definition()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'first_name' => $this->faker->name,
|
'first_name' => $this->faker->name(),
|
||||||
'last_name' => $this->faker->name,
|
'last_name' => $this->faker->name(),
|
||||||
'phone' => $this->faker->phoneNumber,
|
'phone' => $this->faker->phoneNumber(),
|
||||||
'email' => config('ninja.testvars.username'),
|
'email' => config('ninja.testvars.username'),
|
||||||
'email_verified_at' => now(),
|
'email_verified_at' => now(),
|
||||||
'password' => bcrypt(config('ninja.testvars.password')), // secret
|
'password' => bcrypt(config('ninja.testvars.password')), // secret
|
||||||
|
@ -31,10 +31,10 @@ class VendorContactFactory extends Factory
|
|||||||
public function definition()
|
public function definition()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'first_name' => $this->faker->firstName,
|
'first_name' => $this->faker->firstName(),
|
||||||
'last_name' => $this->faker->lastName,
|
'last_name' => $this->faker->lastName(),
|
||||||
'phone' => $this->faker->phoneNumber,
|
'phone' => $this->faker->phoneNumber(),
|
||||||
'email' => $this->faker->unique()->safeEmail,
|
'email' => $this->faker->unique()->safeEmail(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ class VendorFactory extends Factory
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => $this->faker->name(),
|
'name' => $this->faker->name(),
|
||||||
'website' => $this->faker->url,
|
'website' => $this->faker->url(),
|
||||||
'private_notes' => $this->faker->text(200),
|
'private_notes' => $this->faker->text(200),
|
||||||
'vat_number' => $this->faker->text(25),
|
'vat_number' => $this->faker->text(25),
|
||||||
'id_number' => $this->faker->text(20),
|
'id_number' => $this->faker->text(20),
|
||||||
@ -41,11 +41,11 @@ class VendorFactory extends Factory
|
|||||||
'custom_value2' => $this->faker->text(20),
|
'custom_value2' => $this->faker->text(20),
|
||||||
'custom_value3' => $this->faker->text(20),
|
'custom_value3' => $this->faker->text(20),
|
||||||
'custom_value4' => $this->faker->text(20),
|
'custom_value4' => $this->faker->text(20),
|
||||||
'address1' => $this->faker->buildingNumber,
|
'address1' => $this->faker->buildingNumber(),
|
||||||
'address2' => $this->faker->streetAddress,
|
'address2' => $this->faker->streetAddress(),
|
||||||
'city' => $this->faker->city,
|
'city' => $this->faker->city(),
|
||||||
'state' => $this->faker->state,
|
'state' => $this->faker->state(),
|
||||||
'postal_code' => $this->faker->postcode,
|
'postal_code' => $this->faker->postcode(),
|
||||||
'country_id' => 4,
|
'country_id' => 4,
|
||||||
'vendor_hash' => Str::random(40),
|
'vendor_hash' => Str::random(40),
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ class RandomDataSeeder extends Seeder
|
|||||||
$account->save();
|
$account->save();
|
||||||
|
|
||||||
$user = User::factory()->create([
|
$user = User::factory()->create([
|
||||||
'email' => $faker->freeEmail,
|
'email' => $faker->freeEmail(),
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'confirmation_code' => $this->createDbHash(config('database.default')),
|
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||||
]);
|
]);
|
||||||
@ -153,8 +153,8 @@ class RandomDataSeeder extends Seeder
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
ClientContact::create([
|
ClientContact::create([
|
||||||
'first_name' => $faker->firstName,
|
'first_name' => $faker->firstName(),
|
||||||
'last_name' => $faker->lastName,
|
'last_name' => $faker->lastName(),
|
||||||
'email' => config('ninja.testvars.username'),
|
'email' => config('ninja.testvars.username'),
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
'password' => Hash::make(config('ninja.testvars.password')),
|
'password' => Hash::make(config('ninja.testvars.password')),
|
||||||
|
@ -75,8 +75,8 @@ class UsersTableSeeder extends Seeder
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
ClientContact::create([
|
ClientContact::create([
|
||||||
'first_name' => $faker->firstName,
|
'first_name' => $faker->firstName(),
|
||||||
'last_name' => $faker->lastName,
|
'last_name' => $faker->lastName(),
|
||||||
'email' => config('ninja.testvars.clientname'),
|
'email' => config('ninja.testvars.clientname'),
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
'password' => Hash::make(config('ninja.testvars.password')),
|
'password' => Hash::make(config('ninja.testvars.password')),
|
||||||
|
@ -46,10 +46,10 @@ class ProfileSettingsTest extends DuskTestCase
|
|||||||
public function testClientDetailsUpdate()
|
public function testClientDetailsUpdate()
|
||||||
{
|
{
|
||||||
$original = [
|
$original = [
|
||||||
'name' => $this->faker->name,
|
'name' => $this->faker->name(),
|
||||||
'vat_number' => (string) $this->faker->randomNumber(6),
|
'vat_number' => (string) $this->faker->randomNumber(6),
|
||||||
'phone' => $this->faker->phoneNumber,
|
'phone' => $this->faker->phoneNumber(),
|
||||||
'website' => $this->faker->url,
|
'website' => $this->faker->url(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->browse(function (Browser $browser) use ($original) {
|
$this->browse(function (Browser $browser) use ($original) {
|
||||||
@ -85,10 +85,10 @@ class ProfileSettingsTest extends DuskTestCase
|
|||||||
public function testContactDetailsUpdate()
|
public function testContactDetailsUpdate()
|
||||||
{
|
{
|
||||||
$original = [
|
$original = [
|
||||||
'first_name' => $this->faker->firstName,
|
'first_name' => $this->faker->firstName(),
|
||||||
'last_name' => $this->faker->lastName,
|
'last_name' => $this->faker->lastName(),
|
||||||
'email_address' => 'user@example.com',
|
'email_address' => 'user@example.com',
|
||||||
'phone' => $this->faker->phoneNumber,
|
'phone' => $this->faker->phoneNumber(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->browse(function (Browser $browser) use ($original) {
|
$this->browse(function (Browser $browser) use ($original) {
|
||||||
@ -125,11 +125,11 @@ class ProfileSettingsTest extends DuskTestCase
|
|||||||
public function testBillingAddressUpdate()
|
public function testBillingAddressUpdate()
|
||||||
{
|
{
|
||||||
$original = [
|
$original = [
|
||||||
'street' => $this->faker->streetName,
|
'street' => $this->faker->streetName(),
|
||||||
'apt' => $this->faker->streetAddress,
|
'apt' => $this->faker->streetAddress(),
|
||||||
'city' => $this->faker->city,
|
'city' => $this->faker->city(),
|
||||||
'state' => $this->faker->state,
|
'state' => $this->faker->state(),
|
||||||
'postal_code' => $this->faker->postcode,
|
'postal_code' => $this->faker->postcode(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->browse(function (Browser $browser) use ($original) {
|
$this->browse(function (Browser $browser) use ($original) {
|
||||||
@ -168,11 +168,11 @@ class ProfileSettingsTest extends DuskTestCase
|
|||||||
public function testShippingAddressUpdate()
|
public function testShippingAddressUpdate()
|
||||||
{
|
{
|
||||||
$original = [
|
$original = [
|
||||||
'street' => $this->faker->streetName,
|
'street' => $this->faker->streetName(),
|
||||||
'apt' => $this->faker->streetAddress,
|
'apt' => $this->faker->streetAddress(),
|
||||||
'city' => $this->faker->city,
|
'city' => $this->faker->city(),
|
||||||
'state' => $this->faker->state,
|
'state' => $this->faker->state(),
|
||||||
'postal_code' => $this->faker->postcode,
|
'postal_code' => $this->faker->postcode(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->browse(function (Browser $browser) use ($original) {
|
$this->browse(function (Browser $browser) use ($original) {
|
||||||
|
@ -56,7 +56,7 @@ class ClientMergeTest extends TestCase
|
|||||||
|
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'email' => $this->faker->safeEmail,
|
'email' => $this->faker->safeEmail(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->company = Company::factory()->create([
|
$this->company = Company::factory()->create([
|
||||||
@ -104,7 +104,7 @@ class ClientMergeTest extends TestCase
|
|||||||
|
|
||||||
$user = User::factory()->create([
|
$user = User::factory()->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'email' => $this->faker->safeEmail,
|
'email' => $this->faker->safeEmail(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$company = Company::factory()->create([
|
$company = Company::factory()->create([
|
||||||
|
@ -53,7 +53,7 @@ class ClientApiTest extends TestCase
|
|||||||
];
|
];
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'settings' => $settings,
|
'settings' => $settings,
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientLanguageCodeIllegal()
|
public function testClientLanguageCodeIllegal()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'language_code' => 'not_really_a_VALID-locale',
|
'language_code' => 'not_really_a_VALID-locale',
|
||||||
];
|
];
|
||||||
@ -104,7 +104,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientLanguageCodeValidationTrue()
|
public function testClientLanguageCodeValidationTrue()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'language_code' => 'de',
|
'language_code' => 'de',
|
||||||
];
|
];
|
||||||
@ -131,7 +131,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientCountryCodeValidationTrue()
|
public function testClientCountryCodeValidationTrue()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'country_code' => 'AM',
|
'country_code' => 'AM',
|
||||||
];
|
];
|
||||||
@ -154,7 +154,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientNoneValidation()
|
public function testClientNoneValidation()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'number' => '',
|
'number' => '',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientNullValidation()
|
public function testClientNullValidation()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'number' => null,
|
'number' => null,
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientCountryCodeValidationTrueIso3()
|
public function testClientCountryCodeValidationTrueIso3()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'country_code' => 'ARM',
|
'country_code' => 'ARM',
|
||||||
];
|
];
|
||||||
@ -221,7 +221,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientCountryCodeValidationFalse()
|
public function testClientCountryCodeValidationFalse()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'country_code' => 'AdfdfdfM',
|
'country_code' => 'AdfdfdfM',
|
||||||
];
|
];
|
||||||
@ -237,7 +237,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientPost()
|
public function testClientPost()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -251,7 +251,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testDuplicateNumberCatch()
|
public function testDuplicateNumberCatch()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'number' => 'iamaduplicate',
|
'number' => 'iamaduplicate',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientPut()
|
public function testClientPut()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientCurrencyCodeValidationTrue()
|
public function testClientCurrencyCodeValidationTrue()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'currency_code' => 'USD',
|
'currency_code' => 'USD',
|
||||||
];
|
];
|
||||||
@ -388,7 +388,7 @@ class ClientApiTest extends TestCase
|
|||||||
public function testClientCurrencyCodeValidationFalse()
|
public function testClientCurrencyCodeValidationFalse()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'currency_code' => 'R',
|
'currency_code' => 'R',
|
||||||
];
|
];
|
||||||
|
@ -46,7 +46,7 @@ class CreditsTest extends TestCase
|
|||||||
$account = Account::factory()->create();
|
$account = Account::factory()->create();
|
||||||
|
|
||||||
$user = User::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]);
|
$company = Company::factory()->create(['account_id' => $account->id]);
|
||||||
@ -111,7 +111,7 @@ class CreditsTest extends TestCase
|
|||||||
$account = Account::factory()->create();
|
$account = Account::factory()->create();
|
||||||
|
|
||||||
$user = User::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]);
|
$company = Company::factory()->create(['account_id' => $account->id]);
|
||||||
|
@ -44,7 +44,7 @@ class InvoicesTest extends TestCase
|
|||||||
$account = Account::factory()->create();
|
$account = Account::factory()->create();
|
||||||
|
|
||||||
$user = User::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]);
|
$company = Company::factory()->create(['account_id' => $account->id]);
|
||||||
|
@ -305,7 +305,7 @@ class ClientTest extends TestCase
|
|||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => $this->faker->unique()->safeEmail,
|
'contacts' => $this->faker->unique()->safeEmail(),
|
||||||
];
|
];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -360,7 +360,7 @@ class ClientTest extends TestCase
|
|||||||
$data = [
|
$data = [
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
['email' => $this->faker->unique()->safeEmail],
|
['email' => $this->faker->unique()->safeEmail()],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -376,7 +376,7 @@ class ClientTest extends TestCase
|
|||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
[
|
[
|
||||||
'email' => $this->faker->unique()->safeEmail,
|
'email' => $this->faker->unique()->safeEmail(),
|
||||||
'password' => '*****',
|
'password' => '*****',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@ -392,7 +392,7 @@ class ClientTest extends TestCase
|
|||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
[
|
[
|
||||||
'email' => $this->faker->unique()->safeEmail,
|
'email' => $this->faker->unique()->safeEmail(),
|
||||||
'password' => '1',
|
'password' => '1',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@ -414,7 +414,7 @@ class ClientTest extends TestCase
|
|||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
[
|
[
|
||||||
'email' => $this->faker->unique()->safeEmail,
|
'email' => $this->faker->unique()->safeEmail(),
|
||||||
'password' => '1Qajsj...33',
|
'password' => '1Qajsj...33',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@ -437,11 +437,11 @@ class ClientTest extends TestCase
|
|||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
[
|
[
|
||||||
'email' => $this->faker->unique()->safeEmail,
|
'email' => $this->faker->unique()->safeEmail(),
|
||||||
'password' => '1Qajsj...33',
|
'password' => '1Qajsj...33',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'email' => $this->faker->unique()->safeEmail,
|
'email' => $this->faker->unique()->safeEmail(),
|
||||||
'password' => '1234AAAAAaaaaa',
|
'password' => '1234AAAAAaaaaa',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@ -472,7 +472,7 @@ class ClientTest extends TestCase
|
|||||||
|
|
||||||
$arr = $response->json();
|
$arr = $response->json();
|
||||||
|
|
||||||
$safe_email = $this->faker->unique()->safeEmail;
|
$safe_email = $this->faker->unique()->safeEmail();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
@ -506,7 +506,7 @@ class ClientTest extends TestCase
|
|||||||
|
|
||||||
$this->assertEquals(0, strlen($contact->password));
|
$this->assertEquals(0, strlen($contact->password));
|
||||||
|
|
||||||
$safe_email = $this->faker->unique()->safeEmail;
|
$safe_email = $this->faker->unique()->safeEmail();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => 'A loyal Client',
|
'name' => 'A loyal Client',
|
||||||
|
@ -66,7 +66,7 @@ class CompanyTokenApiTest extends TestCase
|
|||||||
$this->withoutMiddleware(PasswordProtection::class);
|
$this->withoutMiddleware(PasswordProtection::class);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
@ -56,7 +56,7 @@ class DesignApiTest extends TestCase
|
|||||||
];
|
];
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'design' => $design,
|
'design' => $design,
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ class DesignApiTest extends TestCase
|
|||||||
$this->assertEquals($this->id, $arr['data']['id']);
|
$this->assertEquals($this->id, $arr['data']['id']);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'design' => $design,
|
'design' => $design,
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ class DesignApiTest extends TestCase
|
|||||||
];
|
];
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'design' => $design,
|
'design' => $design,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class ExpenseApiTest extends TestCase
|
|||||||
public function testExpensePost()
|
public function testExpensePost()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'public_notes' => $this->faker->firstName,
|
'public_notes' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -61,7 +61,7 @@ class ExpenseApiTest extends TestCase
|
|||||||
public function testDuplicateNumberCatch()
|
public function testDuplicateNumberCatch()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'public_notes' => $this->faker->firstName,
|
'public_notes' => $this->faker->firstName(),
|
||||||
'number' => 'iamaduplicate',
|
'number' => 'iamaduplicate',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class ExpenseApiTest extends TestCase
|
|||||||
public function testExpensePut()
|
public function testExpensePut()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'public_notes' => $this->faker->firstName,
|
'public_notes' => $this->faker->firstName(),
|
||||||
'number' => 'Coolio',
|
'number' => 'Coolio',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ class ExpenseApiTest extends TestCase
|
|||||||
public function testAddingExpense()
|
public function testAddingExpense()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
@ -44,7 +44,7 @@ class ExpenseCategoryApiTest extends TestCase
|
|||||||
public function testExpenseCategoryPost()
|
public function testExpenseCategoryPost()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -58,7 +58,7 @@ class ExpenseCategoryApiTest extends TestCase
|
|||||||
public function testExpenseCategoryPut()
|
public function testExpenseCategoryPut()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
@ -94,7 +94,7 @@ class ProfitAndLossReportTest extends TestCase
|
|||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'confirmation_code' => 'xyz123',
|
'confirmation_code' => 'xyz123',
|
||||||
'email' => $this->faker->unique()->safeEmail,
|
'email' => $this->faker->unique()->safeEmail(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = CompanySettings::defaults();
|
$settings = CompanySettings::defaults();
|
||||||
|
@ -287,7 +287,7 @@ class LoadTest extends TestCase
|
|||||||
$invoice->tax_rate3 = 5;
|
$invoice->tax_rate3 = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice->custom_value1 = $faker->date;
|
$invoice->custom_value1 = $faker->date();
|
||||||
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
$invoice->custom_value2 = rand(0, 1) ? 'yes' : 'no';
|
||||||
|
|
||||||
$invoice->save();
|
$invoice->save();
|
||||||
|
@ -57,7 +57,7 @@ class MultiPaymentDeleteTest extends TestCase
|
|||||||
$user = User::factory()->create([
|
$user = User::factory()->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'confirmation_code' => '11',
|
'confirmation_code' => '11',
|
||||||
'email' => $this->faker->unique()->safeEmail,
|
'email' => $this->faker->unique()->safeEmail(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$cu = CompanyUserFactory::create($user->id, $company->id, $account->id);
|
$cu = CompanyUserFactory::create($user->id, $company->id, $account->id);
|
||||||
|
@ -55,7 +55,7 @@ class ProjectApiTest extends TestCase
|
|||||||
public function testProjectPost()
|
public function testProjectPost()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'client_id' => $this->client->hashed_id,
|
'client_id' => $this->client->hashed_id,
|
||||||
'number' => 'duplicate',
|
'number' => 'duplicate',
|
||||||
];
|
];
|
||||||
@ -111,7 +111,7 @@ class ProjectApiTest extends TestCase
|
|||||||
public function testProjectPut()
|
public function testProjectPut()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'public_notes' => 'Coolio',
|
'public_notes' => 'Coolio',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ class TaskApiTest extends TestCase
|
|||||||
public function testTaskPost()
|
public function testTaskPost()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'description' => $this->faker->firstName,
|
'description' => $this->faker->firstName(),
|
||||||
'number' => 'taskynumber',
|
'number' => 'taskynumber',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ class TaskApiTest extends TestCase
|
|||||||
public function testTaskPostNoDefinedTaskNumber()
|
public function testTaskPostNoDefinedTaskNumber()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'description' => $this->faker->firstName,
|
'description' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -129,7 +129,7 @@ class TaskApiTest extends TestCase
|
|||||||
public function testTaskPostWithActionStart()
|
public function testTaskPostWithActionStart()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'description' => $this->faker->firstName,
|
'description' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -144,7 +144,7 @@ class TaskApiTest extends TestCase
|
|||||||
public function testTaskPut()
|
public function testTaskPut()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'description' => $this->faker->firstName,
|
'description' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -238,7 +238,7 @@ class TaskApiTest extends TestCase
|
|||||||
public function testTaskPostWithStartAction()
|
public function testTaskPostWithStartAction()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'description' => $this->faker->firstName,
|
'description' => $this->faker->firstName(),
|
||||||
'number' => 'taskynumber2',
|
'number' => 'taskynumber2',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ class TaskApiTest extends TestCase
|
|||||||
public function testTaskPostWithStopAction()
|
public function testTaskPostWithStopAction()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'description' => $this->faker->firstName,
|
'description' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
@ -44,7 +44,7 @@ class TaskStatusApiTest extends TestCase
|
|||||||
public function testTaskStatusPost()
|
public function testTaskStatusPost()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -58,7 +58,7 @@ class TaskStatusApiTest extends TestCase
|
|||||||
public function testTaskStatusPut()
|
public function testTaskStatusPut()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
@ -44,7 +44,7 @@ class TaxRateApiTest extends TestCase
|
|||||||
|
|
||||||
public function testTaxRatePost()
|
public function testTaxRatePost()
|
||||||
{
|
{
|
||||||
$rate_name = $this->faker->firstName;
|
$rate_name = $this->faker->firstName();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $rate_name,
|
'name' => $rate_name,
|
||||||
@ -85,7 +85,7 @@ class TaxRateApiTest extends TestCase
|
|||||||
public function testTaxRatePostWithActionStart()
|
public function testTaxRatePostWithActionStart()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'rate' => rand(1, 20),
|
'rate' => rand(1, 20),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ class TaxRateApiTest extends TestCase
|
|||||||
public function testTaxRatePut()
|
public function testTaxRatePut()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
@ -45,7 +45,7 @@ class VendorApiTest extends TestCase
|
|||||||
public function testAddVendorToInvoice()
|
public function testAddVendorToInvoice()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -78,7 +78,7 @@ class VendorApiTest extends TestCase
|
|||||||
public function testAddVendorToRecurringInvoice()
|
public function testAddVendorToRecurringInvoice()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -112,7 +112,7 @@ class VendorApiTest extends TestCase
|
|||||||
public function testAddVendorToQuote()
|
public function testAddVendorToQuote()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -145,7 +145,7 @@ class VendorApiTest extends TestCase
|
|||||||
public function testAddVendorToCredit()
|
public function testAddVendorToCredit()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -178,7 +178,7 @@ class VendorApiTest extends TestCase
|
|||||||
public function testVendorPost()
|
public function testVendorPost()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -192,7 +192,7 @@ class VendorApiTest extends TestCase
|
|||||||
public function testVendorPut()
|
public function testVendorPut()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'number' => 'wiggles',
|
'number' => 'wiggles',
|
||||||
];
|
];
|
||||||
|
@ -119,7 +119,7 @@ class EventTest extends TestCase
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'public_notes' => $this->faker->firstName,
|
'public_notes' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -131,7 +131,7 @@ class EventTest extends TestCase
|
|||||||
$arr = $response->json();
|
$arr = $response->json();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'public_notes' => $this->faker->firstName,
|
'public_notes' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -174,7 +174,7 @@ class EventTest extends TestCase
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -186,7 +186,7 @@ class EventTest extends TestCase
|
|||||||
$arr = $response->json();
|
$arr = $response->json();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -608,7 +608,7 @@ class EventTest extends TestCase
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -620,7 +620,7 @@ class EventTest extends TestCase
|
|||||||
$arr = $response->json();
|
$arr = $response->json();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -740,7 +740,7 @@ class EventTest extends TestCase
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
@ -752,7 +752,7 @@ class EventTest extends TestCase
|
|||||||
$arr = $response->json();
|
$arr = $response->json();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
|
@ -48,7 +48,7 @@ trait MockUnitData
|
|||||||
|
|
||||||
$this->user = User::factory()->create([
|
$this->user = User::factory()->create([
|
||||||
'account_id' => $this->account->id,
|
'account_id' => $this->account->id,
|
||||||
'email' => $this->faker->safeEmail,
|
'email' => $this->faker->safeEmail(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->company = Company::factory()->create([
|
$this->company = Company::factory()->create([
|
||||||
|
@ -37,7 +37,7 @@ class ClientSettingsTest extends TestCase
|
|||||||
public function testClientBaseline()
|
public function testClientBaseline()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ class ClientSettingsTest extends TestCase
|
|||||||
public function testClientValidSettings()
|
public function testClientValidSettings()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'currency_id' => '1',
|
'currency_id' => '1',
|
||||||
@ -102,7 +102,7 @@ class ClientSettingsTest extends TestCase
|
|||||||
public function testClientIllegalCurrency()
|
public function testClientIllegalCurrency()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'currency_id' => 'a',
|
'currency_id' => 'a',
|
||||||
@ -132,7 +132,7 @@ class ClientSettingsTest extends TestCase
|
|||||||
public function testClientIllegalLanguage()
|
public function testClientIllegalLanguage()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'currency_id' => '1',
|
'currency_id' => '1',
|
||||||
@ -162,7 +162,7 @@ class ClientSettingsTest extends TestCase
|
|||||||
public function testClientIllegalPaymenTerms()
|
public function testClientIllegalPaymenTerms()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'currency_id' => '1',
|
'currency_id' => '1',
|
||||||
@ -192,7 +192,7 @@ class ClientSettingsTest extends TestCase
|
|||||||
public function testClientIllegalValidUntil()
|
public function testClientIllegalValidUntil()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'currency_id' => '1',
|
'currency_id' => '1',
|
||||||
@ -222,7 +222,7 @@ class ClientSettingsTest extends TestCase
|
|||||||
public function testClientIllegalDefaultTaskRate()
|
public function testClientIllegalDefaultTaskRate()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'currency_id' => '1',
|
'currency_id' => '1',
|
||||||
@ -255,7 +255,7 @@ class ClientSettingsTest extends TestCase
|
|||||||
public function testClientIllegalSendReminderBool()
|
public function testClientIllegalSendReminderBool()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'currency_id' => '1',
|
'currency_id' => '1',
|
||||||
@ -285,7 +285,7 @@ class ClientSettingsTest extends TestCase
|
|||||||
public function testClientSettingBools()
|
public function testClientSettingBools()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $this->faker->firstName,
|
'name' => $this->faker->firstName(),
|
||||||
'id_number' => 'Coolio',
|
'id_number' => 'Coolio',
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'currency_id' => '1',
|
'currency_id' => '1',
|
||||||
|
@ -57,7 +57,7 @@ class EntityTranslationTest extends TestCase
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$u = User::factory()->create([
|
$u = User::factory()->create([
|
||||||
'email' => $this->faker->email,
|
'email' => $this->faker->email(),
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ class FactoryCreationTest extends TestCase
|
|||||||
public function testUserCreate()
|
public function testUserCreate()
|
||||||
{
|
{
|
||||||
$new_user = UserFactory::create($this->account->id);
|
$new_user = UserFactory::create($this->account->id);
|
||||||
$new_user->email = $this->faker->freeEmail;
|
$new_user->email = $this->faker->freeEmail();
|
||||||
$new_user->save();
|
$new_user->save();
|
||||||
|
|
||||||
$this->assertNotNull($new_user);
|
$this->assertNotNull($new_user);
|
||||||
|
@ -37,7 +37,7 @@ class RecurringExpenseCloneTest extends TestCase
|
|||||||
public function testBadBase64String()
|
public function testBadBase64String()
|
||||||
{
|
{
|
||||||
$account = Account::factory()->create();
|
$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]);
|
$company = Company::factory()->create(['account_id' => $account->id]);
|
||||||
|
|
||||||
$client = Client::factory()->create([
|
$client = Client::factory()->create([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user