[logo] => Illuminate\Http\Testing\File Object\n
(\n
[test:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 1\n
[originalName:Symfony\Component\HttpFoundation\File\UploadedFile:private] => avatar.jpg\n
[mimeType:Symfony\Component\HttpFoundation\File\UploadedFile:private] => image/jpeg\n
[error:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 0\n
[originalPath:Symfony\Component\HttpFoundation\File\UploadedFile:private] => avatar.jpg\n
[hashName:protected] => \n
[name] => avatar.jpg\n
[tempFile] => Resource id #1442\n
[sizeToReport] => \n
[mimeTypeToReport] => \n
[pathName:SplFileInfo:private] => /private/var/folders/zz/c88rpf9x3bd284qv3pnt2g6c0000gn/T/phpSI0Epr\n
[fileName:SplFileInfo:private] => phpSI0Epr\n
)\n
\n
)\n
public function test_new_users_can_add_company(): void
{
$this->actingAs($user = User::factory()->create());
Storage::fake('avatars');
$file = UploadedFile::fake()->image('avatar.png');
$data = [
'name' => fake()->name(),
'mark' => fake()->name(),
'kpp' => fake()->numberBetween(),
'description' => fake()->realText(300),
'date_foundation' => fake()->date(),
'address_fact' => fake()->address(),
'address_ur' => fake()->address(),
'address_warehouse' => fake()->address(),
//'logo' => UploadedFile::fake()->image('avatar.jpg'), решить прблему с тестом
];
//$this->assertEquals('some arbitrary value', print_r($data, TRUE));
Livewire::test(AboutCompany::class)
->set('aboutCompanyForm', $data)
->set('aboutCompanyForm.logo', $file)
->call('updateCompany');
$this->assertNotNull($user->fresh()->company);
}