Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
ã¯ããã« Laravel ã使ã£ã¦ããã¨é¿ãã¦ã¯éããªã ORM ã® Eloquentï¼ ãã¼ã¿ãã¼ã¹ããªãã¸ã§ã¯ãæåã£ã½ãæ±ããããé常ã«ä¾¿å©ã§ï¼è¤éãªãªã¬ã¼ã·ã§ã³ãç°¡åã«æ±ãã¡ããéæ³ã®éå ·ã§ãï¼ ä¾ãã°ï¼ä¸»ãã¼ã§ã¢ãã«ãåå¾ããã«ã¯ä»¥ä¸ã®ããã«æ¸ãã°ç°¡åã« DB ãããã¼ã¿ãåå¾ã§ãã¾ãï¼ ç°¡åã§ããð ãã¦ï¼Laravel ã使ã£ãããã¸ã§ã¯ãã«éããï¼ãããã¯ããéçºããä¸ã§ããã¹ãã³ã¼ãããæ¸ããã¨ãããã¾ããï¼ãã¹ããæ¸ãéã«ãã°ãã° ã¢ã㯠ã使ããã¨ãããã¾ãï¼ ã¢ãã¯ï¼ãªãã¸ã§ã¯ãï¼ã¯ï¼ãã¹ã対象ã¨ãªãã¯ã©ã¹ãä¾åããå¤é¨ã¯ã©ã¹ã®æ¯ãèããå®ç¾©ãããã®ã§ï¼æ¬æ¥ä½¿ãããã¯ãã®ãªãã¸ã§ã¯ãã®ä»£ããã«å·®ãè¾¼ããã¨ã§ï¼ãã¹ãçµæãå¤é¨ã®ãã¸ãã¯ã«ãã£ã¦å·¦å³ãããã®ãé²ããã¨ãã§ãã¾ãï¼ Laravel 使ã£ã¦éçºããã¦ãããªãï¼ Mockery ã¨ããã¢ãã¯ã©ã¤ãã©ãªã使ã£
ãããã㤠ã¯ããã¾ãã¦ãã¢ã©ã¤ãã¢ã¼ããã¯ãã®ç³å·ã¨ç³ãã¾ãã 2æã«å ¥ç¤¾ãã¦ããæ©ããï¼ã¶æããã¨ãã¨ãã¦ãã¾ãã ç§ã¯åã®è·å ´ã§ã¯ã»ã¨ãã©javaã§éçºãã¦ããã®ã§ããã ã¢ã©ã¤ãã«å ¥ç¤¾ãã¦ããã¯ä¸»ã«PHPã§éçºããã¦ãã¾ãã ç§ã®åã§ã¯ããã®æãã®æã«é¢å¿ã®ããæè¡æ å ±ãçºä¿¡ãã¦ãããã°ãã¨æã£ã¦ãã¾ãã çæ§ã©ãããããããé¡ããããã¾ãã ä»ã®èªåã®èª²é¡ã¯ã¨ã«ããUnitãã¹ããæ¸ããã¨ãªã®ã§ã ä»åã¯PHPã®ã¢ããã³ã°ãã¬ã¼ã ã¯ã¼ã¯ã§ãããMockeryãã«ã¤ãã¦æ¸ãããã¨æãã¾ãã Mockeryã£ã¦ï¼ padraic / mockery ãã¡ãã§å¾¡åº§ãã¾ãã static methodã®ã¢ãã¯åãåºæ¥ããããã¹ã対象ã®ã¡ã½ããå é¨ã§çæãããã¤ã³ã¹ã¿ã³ã¹ãã¢ãã¯åãããã PHPUnitã§ãããã¨ããã¨ä¸æéããããã¨ããµã¯ã£ã¨åºæ¥ã¦ãã¾ãã¾ãã Letâs ã¤ã³ã¹ãã¼ã«
ãç¥ãã
é害
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}