|
3 | 3 | declare(strict_types=1);
|
4 | 4 |
|
5 | 5 | use App\Livewire\Articles\Create;
|
6 |
| -use Livewire\Livewire; |
7 | 6 | use App\Models\User;
|
| 7 | +use Livewire\Livewire; |
8 | 8 |
|
9 |
| -test('Send notification on telegram after submition on article',function(){ |
10 |
| -// 1- se rassurer que le user est bien connecté |
| 9 | +test('Send notification on telegram after submition on article', function (): void { |
| 10 | + // 1- se rassurer que le user est bien connecté |
11 | 11 | $user = User::factory()->create();
|
12 |
| -// 2- soumission d'article par le user connecté |
| 12 | + // 2- soumission d'article par le user connecté |
13 | 13 | Livewire::actingAs($user)->test(Create::class)
|
14 |
| - ->set('title', 'Test Article') |
15 |
| - ->set('slug', 'test-article') |
16 |
| - ->set('body', 'This is a test article') |
17 |
| - ->set('published_at', now()) |
18 |
| - ->set('submitted_at', null) |
19 |
| - ->set('approved_at', null) |
20 |
| - ->set('show_toc', true) |
21 |
| - ->set('canonical_url', 'https://laravel.cm') |
22 |
| - ->set('associateTags', ['tag1', 'tag2']) |
23 |
| - ->store(); |
| 14 | + ->set('title', 'Test Article') |
| 15 | + ->set('slug', 'test-article') |
| 16 | + ->set('body', 'This is a test article') |
| 17 | + ->set('published_at', now()) |
| 18 | + ->set('submitted_at', null) |
| 19 | + ->set('approved_at', null) |
| 20 | + ->set('show_toc', true) |
| 21 | + ->set('canonical_url', 'https://laravel.cm') |
| 22 | + ->set('associateTags', ['tag1', 'tag2']) |
| 23 | + ->store(); |
24 | 24 |
|
25 |
| -// 3- Envois de la notification au modérateur sur un channel telegram |
| 25 | + // 3- Envois de la notification au modérateur sur un channel telegram |
26 | 26 |
|
27 | 27 | });
|
0 commit comments