Laravel Code Review: Improve PHPUnit Tests

preview_player
Показать описание
I got asked to review a Laravel test suite, so let's see what I suggest to improve for that person.

- - - - -
Support the channel by checking out my products:

- - - - -
Other places to follow:
Рекомендации по теме
Комментарии
Автор

Povilas thanks a lot for the review, I'll follow this and make changes to my tests.

samsonmoses
Автор

Sometimes I wonder what your paid course would look like. Cus this free stuff your dishing out here is a whole lot 100%. Wish I had a mentor like you and Jeffrey. Big Thanks

rolomtech
Автор

For factories that depend on other models, i generate a random number and use it to get a random record of that model. If it doesn't exist, i create a new model

yungifez
Автор

Thanks Sir 🙏 We always learn something new. I love my job 😁

chlouis-girardot
Автор

knomic is a great guy tbh, upcoming nigerian dev 💯💯💯

MusicKneegas-lccy
Автор

I personally prefer using faker for testing but using the $this->faker property

That degree of randomness it brings helps in preventing false positives in some instances and also helps in testing the degree of randomness your app can handle

yungifez
Автор

Can you please share the public Repo, shared by the person. Thanks

fyhqxbz
Автор

Hey Povilas, you didn't follow through with the repos from beginners that we would help with reviewing

yungifez
Автор

Hey povilas,
How could i force utf8 encode on json_decode
I found a method in python called

It returns string like this
That what exactly i need but i can't do this in php

karimtarek