🔹 - خواب شماره ۱ :
اول کار سطرها از داخل یک فایل json بارگذاری بشن.
آخر کار نتایج insert, update در یک فایل دیگه ذخیره بشن.
موقع تست نویسی هم میشه حالت های اولیه مختلف سیستم رو توی فایل های مختلف گذاشت و تو هر تست سراغ یکی شون رفت. (برای درک راحت تر اینا رو به چشم فایل های save نگاه کنید که تو بازی ها ایجاد میشن. حالا فرض کن شما تستر یه بازی هستی و میخوای مرحله ۵ بازی رو تست کنی. قاعدتا مراحل ۱ تا ۴ رو بازی نمیکنی و از save استفاده میکنی.)
@codino
اول کار سطرها از داخل یک فایل json بارگذاری بشن.
FakeDB::loadFrom(__DIR__.'/path/to/starting_db.json');
🔹 - خواب شماره ۲ : آخر کار نتایج insert, update در یک فایل دیگه ذخیره بشن.
FakeDB::saveTo(__DIR__.'/path/to/ending_db.json');
این طوری میشه برای ذخیره اطلاعات دم دستی مثل تنظیمات settings سایت ازش استفاده کرد.موقع تست نویسی هم میشه حالت های اولیه مختلف سیستم رو توی فایل های مختلف گذاشت و تو هر تست سراغ یکی شون رفت. (برای درک راحت تر اینا رو به چشم فایل های save نگاه کنید که تو بازی ها ایجاد میشن. حالا فرض کن شما تستر یه بازی هستی و میخوای مرحله ۵ بازی رو تست کنی. قاعدتا مراحل ۱ تا ۴ رو بازی نمیکنی و از save استفاده میکنی.)
@codino
👍5
This media is not supported in your browser
VIEW IN TELEGRAM
Venture into Laravel Core
سفر به اعماق لاراول - قسمت ۸
(demo - low quality)
@laravel_internals
#preview
🧗♀️🧗♀️🧗♀️
سفر به اعماق لاراول - قسمت ۸
(demo - low quality)
@laravel_internals
#preview
🧗♀️🧗♀️🧗♀️
👍1
یک mini-package دیگه از دل میکروسکوپ بیرون اومد:
https://github.com/imanghafoori1/composer-json
@codino
https://github.com/imanghafoori1/composer-json
@codino
GitHub
GitHub - imanghafoori1/composer-json: A utility class for read composer.json data and use it in PHP
A utility class for read composer.json data and use it in PHP - imanghafoori1/composer-json
🔥8
به نظر خودتون آیا آموزش های کدینو تغییر محسوسی در سبک کدنویسی و کیفیت کار شما ایجاد کرده است؟
@codino
@codino
Anonymous Poll
30%
بله بسیاررررررر
29%
بله - تا حدودی
11%
خیلی کم
29%
آموزش ها رو ندیدم هنوز
🤯3❤2👍1
🥏 تفاوت بین phpunit.xml.dist و phpunit.xml در چیست؟!
(یه نکته مهم که راستش من نمیدونستم تا امروز 🫤🫤 )
https://stackoverflow.com/questions/44764023/is-there-any-difference-in-naming-the-phpunit-configuration-file-phpunit-xml-dis
(یه نکته مهم که راستش من نمیدونستم تا امروز 🫤🫤 )
https://stackoverflow.com/questions/44764023/is-there-any-difference-in-naming-the-phpunit-configuration-file-phpunit-xml-dis
Stack Overflow
Is there any difference in naming the PHPunit configuration file phpunit.xml.dist or phpunit.xml
Can someone explain to me what is the difference between using PHPunit configuration files named phpunit.xml.dist or phpunit.xml.
The official documentation mentions both names:
PHPUnit's XML
The official documentation mentions both names:
PHPUnit's XML
👍7👏1
چرا سایپرس برای تست نویسی با بقیه ابزارها فرق داره و در نوع خودش بهترین هست؟!
https://www.cypress.io/how-it-works/
https://www.cypress.io/how-it-works/
www.cypress.io
How Cypress Works | End to end and component testing tools
Until now, end-to-end testing wasn't easy. It was the part developers hated. Not anymore. Cypress makes setting up, writing, running and debugging tests easy.
خیلی وقت بود رو لاراول کامیت نزده بودم.
https://github.com/laravel/framework/pull/45453#event-8128667367
https://github.com/laravel/framework/pull/45453#event-8128667367
🔥14👍4🤩1
Codino School
https://github.com/laravel/framework/pull/26434
خلاصه ش اینه که با استفاده از نکته فوق، ترتیبی دادم که متدهایی مثل whereKey و findMany به جای whereIn از whereIntegerInRaw استفاده کنند.
@codino
@codino
👍15🤩3👏1
یه آپدیت خوب برای میکروسکوپ توسط یکی از اعضای کانال (علی خسروی)
در نسخه جدید گزارش دقیق تری از عملیات انجام شده توسط artisan check:import در آخر کار ارائه میشه
https://github.com/imanghafoori1/laravel-microscope/pull/245
🏷 v1.0.278
🔬🔬🔬
@codino
در نسخه جدید گزارش دقیق تری از عملیات انجام شده توسط artisan check:import در آخر کار ارائه میشه
https://github.com/imanghafoori1/laravel-microscope/pull/245
🏷 v1.0.278
🔬🔬🔬
@codino
👍18👏4🔥1