One of the amazing things about this course is the deep and behind the scenes explanation. If programming courses are minerals then this course is a Diamond
The contents of this channel are on next level. You videos inspire me alot, more and more to study the core PHP and I get amazed with the beauty of PHP.
Other issues related to my personal life have forced me to be a lot slower in my advancement through these courses, but I believe they would be sorted and allow me to continue to advance at a better pace. Testing sure is advanced stuff. I'm delighted to be having all these exposures. Thanks a lot Gio, even for the extra help you give personally. God bless
This channel is offering quality material worth your time. Thank you Gio. The only drawback since the content is mostly training related all topics are rushed through and hard to follow along especially when learning something new. The speach is way to fast and it help to playback slower in order to follow. Jumping between different screens quickly is also adding to the problem. But otherwise good material.
Gio your tutorials are amazing. Tiny request, is there away to rename them with numbers? I am struggling to find the videos when I need them immediately. Please try. Great work. I love them.
Thank you. Check the description of the video, there is a link to the outline repo which lists all the videos in order with their numbers, titles & links. Hope that helps
In this specific example yes there is no need because its empty in the parent class. The parent::setUp() call was generated by IDE automatically when I overrode the method. That being said, it does not hurt to call the parent when overriding methods unless you specifically dont want to call it because in some cases it may contain crucial setup procedures needed for testing.
Hi Gio, I'm trying to learn PHP from your guide and so far it's going great, thank you! I tried to include a stylesheet and it doesn't seem to work though. I found that some people fixed it by adding "include /etc/nginx/mime.types;" into the nginx.conf location part, but that doesn't solve it for me. Any idea how this could be fixed? Thank you again!
Gio I have some problems bro, so after downloading the phpunit in the vendor folder it creates only sebastian folder and nothing else. What can be the problem?
Thank you for making this video!! I'm currently trying to do this and whenever I "extends TestCase", it gives me this error "Undefined type 'PHPUnit\Framework\TestCase'.". Are you able to tell me what it is wrong?
Have you set up autoloading properly in composer.json? DM me on Twitter and send me a screenshot of your composer.json and the test class and I can take a look.
Hello! I have a question. Our code is a mix of procedural and functional. Still, I want to have unit testing for my code. Is it possible to use PHPUnit for testing the functions? All of the examples given in the videos I watched are used for OOP and I don't know if I have to change something for PHPUnit to work.
Hello! You could use PHPUnit to test procedural code. You may need some additional setup within the setup method but it's doable. Depending on what the function is or how complex it is, it might not be that hard to actually write tests for it. You could use include/requires if you are not using namespaces but I would recommend starting converting to OOP when possible.
@@ProgramWithGio Thanks Gio! I really like to explore and practice OOP but we don't have much time to implement OOP and MVC to our project since we have little knowledge about it. Thanks again!
Hey Gio, I've got a weird problem. After installing phpunit with composer and building the app I do get the PHPUnit folder with the files within the vendor directory, but there is an issue with vendor/bin. The explorer in VS Code doesn't see any phpunit files in there, and when I manually go there using the file explorer I see two empty files without extensions. They seem to be broken because I cannot even open them from there. Reinstalling phpunit with composer doesn't change anything. Do you reckon what could be the issue?
Did you add @dataProvider routeNotFoundCases to your test method? github.com/ggelashvili/learnphptherightway-project/blob/3.1/tests/Unit/RouterTest.php check this out and compare to your version
@@ProgramWithGio I checked out the code and mine are the same. This is the message i get "Data Provider method \Tests\DataProviders\RouterDataProvider::routeNotFoundCases() is not static"
For anyone that may face a hurdle with class dependencies not being picked up properly when you run phpunit, make sure you include the autoload object within your composer, which Gio talked about in this video: th-cam.com/video/rqzYdHdyMH0/w-d-xo.html. I had skipped that video and jumped straight into this one, and couldn't figure out why my classes weren't able to be found when running tests.
Really great content! But in my opinion, very difficult to listen to. The whole video series follows a melancholy tone of reading the text, without a dot or comma, as if everything was read in one breath, which makes it difficult for me as a listener to follow your video tutorials. If you use audio editing programs where you eject parts without voice, to reduce the length of the recording, then you get a robotic audio recording. Maybe my English is not that good, but that is my honest opinion and constructive suggestion to change for the next tutorials.
Thank you for feedback. English isn't my native language so that combined with me speaking fast can be a factor. Also yes I've done wrong audio editing on some videos so that is something I'm gonna get better at 👍. That being said though I don't think "entire series" are like that, just few videos in my opinion. Changing playback speed on TH-cam might help a little bit.
Depends how its installed, maybe on your side its installed globally & the executable is part of the system's PATH variable. Or maybe its just an alias to `vendor/bin/phpunit`.
@@ProgramWithGio Its ok. We have lots of problems with TH-cam courses. Most trainers use either the Mac or Linux server and we use XAMPP on windows which works well with VPS servers running CPanel. We try and figure it out or give up on the course and move on. Hehehe..
@@truthteachers XAMPP shouldn't be used in production to be honest. And the OS shouldn't really matter, you can use WSL in Windows and have Linux subsystem. I'm not sure I understand what the issue is with TH-cam courses or this specific course. I use Windows in the series with WSL but we use Docker instead of XAMPP, XAMPP we used in 1st section
I need to dive into this channel because it seems to have quality PHP related stuff. Really good job!
Thank you 💙
One of the amazing things about this course is the deep and behind the scenes explanation.
If programming courses are minerals then this course is a Diamond
Thank you for kind words buddy 🙌
You are the best programming teacher i ever had! Thank you so much!!!
Thank you 🙌
Thank you so much!
You are literally changing the world into a better place!
That's great to hear, thank you 💙
The contents of this channel are on next level. You videos inspire me alot, more and more to study the core PHP and I get amazed with the beauty of PHP.
I'm really glad to hear that. Thank you 🙏
Your content is very very great, you talk about things no one has mentioned before.
Keep going Gio
Thank you 🙏
Gio you are a great teacher. No need to increase the speed on these vids. Well done.
Thank you 🙌
Other issues related to my personal life have forced me to be a lot slower in my advancement through these courses, but I believe they would be sorted and allow me to continue to advance at a better pace. Testing sure is advanced stuff. I'm delighted to be having all these exposures. Thanks a lot Gio, even for the extra help you give personally. God bless
You're welcome. Hope everything is ok 💙
@@ProgramWithGio yeah. I should be back to pace before the end of the week.
Your tutorials are proofs why php is most used language
💙💙
I’m loving this. Writing tests is the major skill I’m trying to build to have all the confidence I crave. Thanks 🙏
You got this! 💙
This channel is offering quality material worth your time. Thank you Gio. The only drawback since the content is mostly training related all topics are rushed through and hard to follow along especially when learning something new. The speach is way to fast and it help to playback slower in order to follow. Jumping between different screens quickly is also adding to the problem. But otherwise good material.
I appreciate the feedback, thank you
Last time I got tested this much was during pandemics. Another great in-depth lesson!
😂😂
The best PHP unit testing lessons out there. Thank you!
You got a new subscriber.
Welcome aboard, thank you 💙
Thanks!
Thank you for your support 💙
Great video, great content and good example for writing solid PHP tests.
Thank you 💙
Excellent! Thanks for this extremely useful PHP series!
You're very welcome
So smoooooooooooth ... Amazing content. Keep going Gio
Thank you 💙
Gio your tutorials are amazing. Tiny request, is there away to rename them with numbers? I am struggling to find the videos when I need them immediately. Please try. Great work. I love them.
Thank you. Check the description of the video, there is a link to the outline repo which lists all the videos in order with their numbers, titles & links. Hope that helps
@@ProgramWithGio ❤
Thank you so much, your videos helped me a lot!
You're just so on point. Well done
Thank you 🙌
why do we use
parent::setUp();
in the setUp function?
what the point? I thought we use it if our class extends other parent custom class?
In this specific example yes there is no need because its empty in the parent class. The parent::setUp() call was generated by IDE automatically when I overrode the method. That being said, it does not hurt to call the parent when overriding methods unless you specifically dont want to call it because in some cases it may contain crucial setup procedures needed for testing.
Hi Gio, I'm trying to learn PHP from your guide and so far it's going great, thank you! I tried to include a stylesheet and it doesn't seem to work though. I found that some people fixed it by adding "include /etc/nginx/mime.types;" into the nginx.conf location part, but that doesn't solve it for me. Any idea how this could be fixed? Thank you again!
Hey, how are you including the stylesheets? DM me on Twitter with screenshot & I'll help you troubleshoot it
Awesome video! Very clear and to the point 👌
Thank you Dan
Gio I have some problems bro, so after downloading the phpunit in the vendor folder it creates only sebastian folder and nothing else. What can be the problem?
I just solved it GIO, in xampp I had the extension=zip in comments after uncommenting it, it helped. Thanks!
Awesome, glad you got it working, good job
Thank you for making this video!! I'm currently trying to do this and whenever I "extends TestCase", it gives me this error "Undefined type 'PHPUnit\Framework\TestCase'.". Are you able to tell me what it is wrong?
Have you set up autoloading properly in composer.json? DM me on Twitter and send me a screenshot of your composer.json and the test class and I can take a look.
I noticed that you run compose to install phpunit directly in docker image. Is that necessary? I have composer installed globally
Depends on your setup, in some cases you may not need it but I prefer to have it available in container
What software do you suggest to improve my typing speed? Thank you for the video
I haven't used any software, just code & practice 🙂
very impressive great Gio 💕❤️
Thank you
Superb videos!! 💥
Thanks ✌️
Great videos. Thank you
Thank you
You're awesome , thanks a lot for this amazing content :)
Thank you 🙌
Hello! I have a question. Our code is a mix of procedural and functional. Still, I want to have unit testing for my code. Is it possible to use PHPUnit for testing the functions? All of the examples given in the videos I watched are used for OOP and I don't know if I have to change something for PHPUnit to work.
Hello! You could use PHPUnit to test procedural code. You may need some additional setup within the setup method but it's doable. Depending on what the function is or how complex it is, it might not be that hard to actually write tests for it. You could use include/requires if you are not using namespaces but I would recommend starting converting to OOP when possible.
@@ProgramWithGio Thanks Gio! I really like to explore and practice OOP but we don't have much time to implement OOP and MVC to our project since we have little knowledge about it. Thanks again!
@@nuvia1484 Makes sense. You're welcome
There is a deprecation waring for annotations /** @test */ . In the future (php unit 12) php attributes should be used. These look like this: #[test]
Attribute #[Test] doesn't work alone without test prefix like annotaions was able to do
amazing tutorial thank you bro
Always welcome
Hey Gio, I've got a weird problem. After installing phpunit with composer and building the app I do get the PHPUnit folder with the files within the vendor directory, but there is an issue with vendor/bin. The explorer in VS Code doesn't see any phpunit files in there, and when I manually go there using the file explorer I see two empty files without extensions. They seem to be broken because I cannot even open them from there. Reinstalling phpunit with composer doesn't change anything. Do you reckon what could be the issue?
Hello 👋. That is strange, have you tried deleting vendors directory and running composer install after?
Bro mine is same
There is no extension but the file works and opens juat fine
Great video, thanks
Thank you
@@ProgramWithGio No, thank you sir
In my testing (timestamp 23:44), PHPUnit requires the "routeNotFoundCases" method to be static. Is it because i am using PHP 8.1.12?
Did you add @dataProvider routeNotFoundCases to your test method? github.com/ggelashvili/learnphptherightway-project/blob/3.1/tests/Unit/RouterTest.php check this out and compare to your version
@@ProgramWithGio I checked out the code and mine are the same. This is the message i get "Data Provider method \Tests\DataProviders\RouterDataProvider::routeNotFoundCases() is not static"
@@truthteachers can you send me screenshot of your entire class? Can send it on Twitter DM
i got the same with phpdoc or data attribute #[DataProvider('routeNotFoundCases')]
Just make it static I guess ;)
Thank you so much!
You're welcome
Thank you so much! 🙌🏻
You're welcome
thank you very much
You're welcome
Very nice video...thx a lot.
Thank you too!
TY so much
You're welcome
For anyone that may face a hurdle with class dependencies not being picked up properly when you run phpunit, make sure you include the autoload object within your composer, which Gio talked about in this video: th-cam.com/video/rqzYdHdyMH0/w-d-xo.html. I had skipped that video and jumped straight into this one, and couldn't figure out why my classes weren't able to be found when running tests.
Thank you so much
You're welcome
Thank you.
💙
PHP Storm seems better. Which good IDE i can use for PHP for free?
I hear vscode is good, not a full fledged IDE but pretty good for free with plugins
if i dont named test functions beginning with test, phpunit dont find it.
You can add @test annotation to it and then it will work
@@ProgramWithGio thanks, now it's working, I had capitalized the annotation first letter.
Awesome ❤
Thanks 💙
what operating system you use?
For recording windows, otherwise linux
@@ProgramWithGio what linux distro is your favorite?
I've been using Ubuntu
great content
Thanks 🙌
Can i get this sourcecode ?
Check description of the video
thanks a lot
You're welcome 💙
this is a little condensed for me 😐
I need to break it down slowly
multiple things are happening and new definitions are presented
Yup, third section is more challenging for sure, so take your time
❤❤❤❤
💙💙
i personally prefer TDD
That's good 👍
Let's see, make a site and see
umm, see what?
@@ProgramWithGio blog site creation with php
@@kunduz2652 we are not building that in this series.
Really great content! But in my opinion, very difficult to listen to. The whole video series follows a melancholy tone of reading the text, without a dot or comma, as if everything was read in one breath, which makes it difficult for me as a listener to follow your video tutorials. If you use audio editing programs where you eject parts without voice, to reduce the length of the recording, then you get a robotic audio recording. Maybe my English is not that good, but that is my honest opinion and constructive suggestion to change for the next tutorials.
Thank you for feedback. English isn't my native language so that combined with me speaking fast can be a factor. Also yes I've done wrong audio editing on some videos so that is something I'm gonna get better at 👍. That being said though I don't think "entire series" are like that, just few videos in my opinion. Changing playback speed on TH-cam might help a little bit.
@@ProgramWithGio Thank you so much!!! 👍
I'm having a hard time understanding this :(
Try rewatching it or if there is something specific you are not understanding dig into the documentation
@@ProgramWithGio thank you. Your reply helps a lot.
Bro, for vscode in Windows 10, the command line for initiating phpunit is "php phpunit --version".
Depends how its installed, maybe on your side its installed globally & the executable is part of the system's PATH variable. Or maybe its just an alias to `vendor/bin/phpunit`.
@@ProgramWithGio Its ok. We have lots of problems with TH-cam courses. Most trainers use either the Mac or Linux server and we use XAMPP on windows which works well with VPS servers running CPanel. We try and figure it out or give up on the course and move on. Hehehe..
@@truthteachers XAMPP shouldn't be used in production to be honest. And the OS shouldn't really matter, you can use WSL in Windows and have Linux subsystem. I'm not sure I understand what the issue is with TH-cam courses or this specific course. I use Windows in the series with WSL but we use Docker instead of XAMPP, XAMPP we used in 1st section
great video
Thank you