- usage metric fix

- ui fix
- index:usage artisan command
- demo payment settings
This commit is contained in:
Čarodej
2022-01-10 15:43:55 +01:00
parent 5de2b8b0e0
commit 08139c8f96
47 changed files with 88 additions and 50 deletions

View File

@@ -1,6 +1,8 @@
<?php
namespace Tests\App\Socialite;
use Mockery;
use Storage;
use Tests\TestCase;
use App\Users\Models\User;
@@ -35,12 +37,16 @@ class SocialiteTest extends TestCase
]);
// Create fake user
$socialiteUser = $this->createMock(\Laravel\Socialite\Two\User::class);
$socialiteUser->token = 'fake_token';
$socialiteUser->id = 'fake_id';
$socialiteUser->name = 'Jane Doe';
$socialiteUser->email = 'howdy@hi5ve.digital';
$socialiteUser->avatar = 'https://vuefilemanager.com/avatar.jpg';
$socialiteUser = Mockery::mock(\Laravel\Socialite\Two\User::class);
$socialiteUser
->shouldReceive('getId')
->andReturn('fake_id')
->shouldReceive('getEmail')
->andReturn('howdy@hi5ve.digital')
->shouldReceive('getName')
->andReturn('Jane Doe')
->shouldReceive('getAvatar')
->andReturn('https://vuefilemanager.com/avatar.jpg');
// Mock user with FB provider
$provider = $this->createMock(FacebookProvider::class);
@@ -75,7 +81,7 @@ class SocialiteTest extends TestCase
collect(config('vuefilemanager.avatar_sizes'))
->each(
fn ($size) => Storage::disk('local')
fn($size) => Storage::disk('local')
->assertExists("avatars/{$size['name']}-{$user->settings->getRawOriginal('avatar')}")
);
}