Тёмный

How to test Inertia JS using PHPUnit and Laravel 9 

Coding with Pixel Fix
Подписаться 992
Просмотров 2,7 тыс.
50% 1

In this video, I will be showing you how to create functional tests for your Inertia JS application using PHPUnit and Laravel 9. We will test the full registration process with validation and automatic login after registration.
How to create a registration form using React JS, TypeScript, Inertia JS, and Laravel 9
• How to create a regist...
How to create React JS pages and use Laravel 9 routing with Inertia JS and TypeScript
• How to create React JS...
How to install Laravel 9, React JS, Inertia JS, and TypeScript:
• How to install Laravel...
Click here to subscribe
www.youtube.co...
I offer free code reviews as a way to give back and share my knowledge with the community. So, please feel free to reach out if interested. My contact details are available on the channel's about page or checkout the links below: / codingwithpixelfix
Reddit
/ laravelcodereviews
Medium
/ codingwithpixelfix
Facebook
/ codingwithpixelfix
Twitter
/ pixelfixnetau
LinkedIn
/ codingwithpixelfix
Github
github.com/pix...
#laravel #laraveltips #phpunit #php

Опубликовано:

 

16 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 16   
@faycalfaycal6796
@faycalfaycal6796 Год назад
Perfect timing! I was just having problems with testing not returing the expected HTML content, now I know it's Inertia.. thanks a lot!
@CodingWithPixelFix
@CodingWithPixelFix Год назад
Great to hear! This message didn't show up until now, so sorry for the late reply.
@mostafakhaled6680
@mostafakhaled6680 2 года назад
great content , thanks for the video
@CodingWithPixelFix
@CodingWithPixelFix 2 года назад
You're welcome and I am glad you liked it!
@LeonBienek
@LeonBienek Год назад
Great content. Really helpful
@CodingWithPixelFix
@CodingWithPixelFix Год назад
Thank you, I am glad you found it useful.
@dk81
@dk81 10 месяцев назад
Thank you very much.
@NishaSharma-iv5dk
@NishaSharma-iv5dk 6 месяцев назад
Thanks for the content. But I am getting an error as "Not a valid Inertia response." Even though my controller is returning Inertia::render do you know why?
@CodingWithPixelFix
@CodingWithPixelFix 6 месяцев назад
You're welcome. Are you using the ->followRedirects() or ->followingRedirects() method in your test?
@NishaSharma-iv5dk
@NishaSharma-iv5dk 6 месяцев назад
No, I am using any of those. it's just public function test_dashboard_rendering(): void { $this->actingAs($user = User::factory()->withPersonalTeam()->create()); $response = $this->get('/dashboard'); $response->assertStatus(200); $this->get(route('dashboard')) ->assertOk() ->assertInertia(fn (Assert $page) => $page ->component('Dashboard') ); }
@CodingWithPixelFix
@CodingWithPixelFix 6 месяцев назад
@NishaSharma-iv5dk ok, try adding the following and let me know. $this->followingRedirects()->get(route('dashboard'))......
@NishaSharma-iv5dk
@NishaSharma-iv5dk 6 месяцев назад
@@CodingWithPixelFixThanks for your prompt reply. Still has the same error. :(
@CodingWithPixelFix
@CodingWithPixelFix 6 месяцев назад
@@NishaSharma-iv5dk ok, if you send me the github repo, I will have a look.
@frankstekelenburg1855
@frankstekelenburg1855 Год назад
followingRedirects() does not exist. is an error i am getting. Do you know why?
@CodingWithPixelFix
@CodingWithPixelFix Год назад
What version of Laravel, Inertia and PHPUnit are you using? Do you have a repo with the code?
Далее
I'm new to testing in Laravel (Watch me learn)
22:03
How would you react?!😳
00:44
Просмотров 2,9 млн
ЗАБЛУДИЛИСЬ В ТРАВЕ #shorts
00:25
Просмотров 540 тыс.
Laracasts Owner Reviews Pest for the First Time
33:15
Laravel Testing 21/24: What is PEST and How It Works
13:40
PHPUnit in Laravel: Simple Example of Why/How to Test
12:11
Node.js is a serious thing now… (2023)
8:18
Просмотров 646 тыс.
Getting Started with React in Laravel
4:51
Просмотров 39 тыс.
Testing Email Sending with Laravel Dusk
12:47
Просмотров 2,1 тыс.
Every React Concept Explained in 12 Minutes
11:53
Просмотров 632 тыс.