{"id":3452,"date":"2025-03-24T08:46:09","date_gmt":"2025-03-23T23:46:09","guid":{"rendered":"https:\/\/dexall.co.jp\/articles\/?p=3452"},"modified":"2025-03-24T08:46:39","modified_gmt":"2025-03-23T23:46:39","slug":"%e3%80%90%e5%ae%8c%e5%85%a8%e3%82%ac%e3%82%a4%e3%83%89%e3%80%91phpunit%e3%81%a7%e5%ae%9f%e7%8f%be%e3%81%99%e3%82%8b%e5%a0%85%e7%89%a2%e3%81%aa%e3%82%b3%e3%83%bc%e3%83%89%e5%93%81%e8%b3%aa-%e5%b0%8e","status":"publish","type":"post","link":"https:\/\/dexall.co.jp\/articles\/?p=3452","title":{"rendered":"\u3010\u5b8c\u5168\u30ac\u30a4\u30c9\u3011PHPUnit\u3067\u5b9f\u73fe\u3059\u308b\u5805\u7262\u306a\u30b3\u30fc\u30c9\u54c1\u8cea &#8211; \u5c0e\u5165\u304b\u3089\u5b9f\u8df5\u307e\u30677\u3064\u306e\u30b9\u30c6\u30c3\u30d7"},"content":{"rendered":"\n<div class=\"toc\"><br \/>\n<b>Warning<\/b>:  Undefined array key \"is_admin\" in <b>\/home\/xs392991\/dexall.co.jp\/public_html\/articles\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>116<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_category_top\" in <b>\/home\/xs392991\/dexall.co.jp\/public_html\/articles\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>121<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_top\" in <b>\/home\/xs392991\/dexall.co.jp\/public_html\/articles\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>128<\/b><br \/>\n    <div id=\"toc_container\" class=\"sgb-toc--bullets js-smooth-scroll\" data-dialog-title=\"\u76ee\u6b21\">\n      <p class=\"toc_title\">\u76ee\u6b21 <\/p>\n      <ul class=\"toc_list\">  <li class=\"first\">    <a href=\"#i-0\">PHPUnit\u3068\u306f\uff1f\u57fa\u672c\u6982\u5ff5\u3068\u91cd\u8981\u6027\u3092\u7406\u89e3\u3059\u308b<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-1\">PHPUnit\u304cPHP\u958b\u767a\u306e\u6a19\u6e96\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308b\u7406\u7531<\/a>      <\/li>      <li>        <a href=\"#i-2\">\u30c6\u30b9\u30c8\u99c6\u52d5\u958b\u767a(TDD)\u3068PHPUnit\u306e\u76f8\u6027<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-3\">\u5358\u4f53\u30c6\u30b9\u30c8\u304c\u3082\u305f\u3089\u3059\u30b3\u30fc\u30c9\u54c1\u8cea\u3068\u958b\u767a\u52b9\u7387\u306e\u5411\u4e0a<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-4\">PHPUnit\u306e\u74b0\u5883\u69cb\u7bc9 \u2013 \u8fc5\u901f\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u65b9\u6cd5<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-5\">Composer\u3092\u4f7f\u3063\u305f\u6700\u65b0\u7248PHPUnit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806<\/a>      <\/li>      <li>        <a href=\"#i-6\">PHPUnit\u306e\u57fa\u672c\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30ebphpunit.xml\u306e\u66f8\u304d\u65b9<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-7\">\u7570\u306a\u308bPHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u4e92\u63db\u6027\u3068\u6ce8\u610f\u70b9<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-8\">PHPUnit\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9 \u2013 \u6700\u521d\u306e\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u4f5c\u6210<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-9\">\u30c6\u30b9\u30c8\u30af\u30e9\u30b9\u3068\u30c6\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u306e\u547d\u540d\u898f\u5247\u3068\u69cb\u9020<\/a>      <\/li>      <li>        <a href=\"#i-10\">assert\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u69d8\u3005\u306a\u691c\u8a3c\u65b9\u6cd5<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-11\">\u30c6\u30b9\u30c8\u5b9f\u884c\u3068\u30ec\u30dd\u30fc\u30c8\u51fa\u529b\u306e\u30b3\u30de\u30f3\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-12\">PHPUnit\u3092\u4f7f\u3063\u305f\u30e2\u30c3\u30af\u3068\u30b9\u30bf\u30d6\u306e\u6d3b\u7528\u6cd5<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-13\">\u5916\u90e8\u4f9d\u5b58\u3092\u6301\u3064\u30b3\u30fc\u30c9\u3092\u52b9\u679c\u7684\u306b\u30c6\u30b9\u30c8\u3059\u308b\u65b9\u6cd5<\/a>      <\/li>      <li>        <a href=\"#i-14\">Database\u3084API\u30a2\u30af\u30bb\u30b9\u306e\u30e2\u30c3\u30af\u5316\u30c6\u30af\u30cb\u30c3\u30af<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-17\">\u30e2\u30c3\u30af\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u3075\u308b\u307e\u3044\u3092\u5b9a\u7fa9\u3059\u308b\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-18\">\u30c6\u30b9\u30c8\u30ab\u30d0\u30ec\u30c3\u30b8\u306e\u5411\u4e0a \u2013 \u7db2\u7f85\u6027\u3092\u9ad8\u3081\u308b\u6226\u7565<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-19\">PHPUnit\u3067\u30ab\u30d0\u30ec\u30c3\u30b8\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210\u3059\u308b\u65b9\u6cd5<\/a>      <\/li>      <li>        <a href=\"#i-20\">\u6761\u4ef6\u5206\u5c90\u3068\u30a8\u30c3\u30b8\u30b1\u30fc\u30b9\u3092\u78ba\u5b9f\u306b\u30c6\u30b9\u30c8\u3059\u308b\u30a2\u30d7\u30ed\u30fc\u30c1<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-24\">\u30ab\u30d0\u30ec\u30c3\u30b8\u76ee\u6a19\u306e\u8a2d\u5b9a\u3068\u6bb5\u968e\u7684\u306a\u6539\u5584\u30d7\u30ed\u30bb\u30b9<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-25\">\u5b9f\u8df5\u7684\u306aPHPUnit\u30c6\u30b9\u30c8\u4e8b\u4f8b \u2013 \u73fe\u5834\u3067\u4f7f\u3048\u308b\u30d1\u30bf\u30fc\u30f3<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-26\">Laravel\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306e\u30e2\u30c7\u30eb\u3068\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u30c6\u30b9\u30c8\u4f8b<\/a>      <\/li>      <li>        <a href=\"#i-29\">Symfony\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306e\u30b5\u30fc\u30d3\u30b9\u30af\u30e9\u30b9\u30c6\u30b9\u30c8\u5b9f\u88c5<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-30\">\u30ec\u30ac\u30b7\u30fc\u30b3\u30fc\u30c9\u3078\u306e\u30c6\u30b9\u30c8\u5c0e\u5165\u30a2\u30d7\u30ed\u30fc\u30c1<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-31\">CI\/CD\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3078\u306ePHPUnit\u7d71\u5408\u30ac\u30a4\u30c9<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-32\">GitHubActions\u3067PHPUnit\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u3059\u308b\u8a2d\u5b9a\u4f8b<\/a>      <\/li>      <li>        <a href=\"#i-33\">Jenkins\u3067\u306ePHPUnit\u30c6\u30b9\u30c8\u5b9f\u884c\u3068\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u306e\u65b9\u6cd5<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-34\">\u30c6\u30b9\u30c8\u5931\u6557\u6642\u306e\u30a2\u30e9\u30fc\u30c8\u3068\u5bfe\u5fdc\u30d5\u30ed\u30fc\u306e\u69cb\u7bc9<\/a>      <\/li>    <\/ul>  <\/li>  <li class=\"last\">    <a href=\"#i-35\">PHPUnit\u30c6\u30b9\u30c8\u6587\u5316\u3092\u30c1\u30fc\u30e0\u306b\u6839\u4ed8\u304b\u305b\u308b\u305f\u3081\u306e\u30b9\u30c6\u30c3\u30d7<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-36\">\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3067\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306e\u54c1\u8cea\u3092\u9ad8\u3081\u308b\u65b9\u6cd5<\/a>      <\/li>      <li>        <a href=\"#i-37\">\u30da\u30a2\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u3088\u308b\u30c6\u30b9\u30c8\u4f5c\u6210\u30b9\u30ad\u30eb\u306e\u5171\u6709<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-38\">\u30c6\u30b9\u30c8\u99c6\u52d5\u306e\u958b\u767a\u30b5\u30a4\u30af\u30eb\u3092\u30c1\u30fc\u30e0\u306b\u5b9a\u7740\u3055\u305b\u308b\u30b3\u30c4<\/a>      <\/li>    <\/ul>  <\/li><\/ul>\n      <a href=\"#\" class=\"sgb-toc-button js-toc-button\" rel=\"nofollow\" data-open-dialog=\"true\"><i class=\"fa fa-list\"><\/i><span class=\"sgb-toc-button__text\">\u76ee\u6b21\u3078<\/span><\/a>\n    <\/div><\/div><h2 class=\"wp-block-heading\" id=\"i-0\">PHPUnit\u3068\u306f\uff1f\u57fa\u672c\u6982\u5ff5\u3068\u91cd\u8981\u6027\u3092\u7406\u89e3\u3059\u308b<\/h2>\n\n\n\n<p>PHPUnit\u306f\u3001PHP\u8a00\u8a9e\u3067\u958b\u767a\u3055\u308c\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u5358\u4f53\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308a\u3001\u73fe\u5728\u306ePHP\u958b\u767a\u306b\u304a\u3044\u3066\u6700\u3082\u5e83\u304f\u4f7f\u308f\u308c\u3066\u3044\u308b\u30c6\u30b9\u30c8\u30c4\u30fc\u30eb\u3067\u3059\u3002Sebastian Bergmann\u306b\u3088\u3063\u3066\u958b\u767a\u3055\u308c\u3001xUnit\u30d5\u30a1\u30df\u30ea\u30fc\u306b\u5c5e\u3059\u308b\u3053\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306f\u3001\u7d99\u7d9a\u7684\u306a\u6539\u5584\u3092\u91cd\u306d\u3001PHP\u958b\u767a\u306e\u54c1\u8cea\u4fdd\u8a3c\u306b\u304a\u3044\u3066\u6b20\u304b\u305b\u306a\u3044\u5b58\u5728\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-1\">PHPUnit\u304cPHP\u958b\u767a\u306e\u6a19\u6e96\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308b\u7406\u7531<\/h3>\n\n\n\n<p>PHPUnit\u304cPHP\u958b\u767a\u306b\u304a\u3051\u308b\u4e8b\u5b9f\u4e0a\u306e\u6a19\u6e96\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u306a\u3063\u305f\u7406\u7531\u306b\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u91cd\u8981\u306a\u8981\u7d20\u304c\u3042\u308a\u307e\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6210\u719f\u5ea6\u3068\u5b89\u5b9a\u6027<\/strong>: 2004\u5e74\u306e\u521d\u30ea\u30ea\u30fc\u30b9\u4ee5\u6765\u3001\u9577\u671f\u306b\u308f\u305f\u308b\u958b\u767a\u3068\u6539\u5584\u3092\u7d4c\u3066\u304a\u308a\u3001\u5b89\u5b9a\u6027\u3068\u4fe1\u983c\u6027\u304c\u9ad8\u3044<\/li>\n\n\n\n<li><strong>\u5e83\u7bc4\u306a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30b5\u30dd\u30fc\u30c8<\/strong>: \u6d3b\u767a\u306a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3088\u308b\u7d99\u7d9a\u7684\u306a\u6539\u5584\u3068\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u6574\u5099<\/li>\n\n\n\n<li><strong>\u4e3b\u8981\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u306e\u7d71\u5408<\/strong>: Laravel\u3001Symfony\u3001CakePHP\u306a\u3069\u4e3b\u8981\u306aPHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u304c\u6a19\u6e96\u3067\u30b5\u30dd\u30fc\u30c8<\/li>\n\n\n\n<li><strong>\u8c4a\u5bcc\u306a\u6a5f\u80fd\u30bb\u30c3\u30c8<\/strong>: \u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u3001\u30e2\u30c3\u30af\u3001\u30b9\u30bf\u30d6\u3001\u30c7\u30fc\u30bf\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u306a\u3069\u3001\u5305\u62ec\u7684\u306a\u30c6\u30b9\u30c8\u6a5f\u80fd\u3092\u63d0\u4f9b<\/li>\n\n\n\n<li><strong>\u81ea\u52d5\u5316\u30c4\u30fc\u30eb\u3068\u306e\u4e92\u63db\u6027<\/strong>: Jenkins\u3084GitHub Actions\u306a\u3069\u3001CI\/CD\u30c4\u30fc\u30eb\u3068\u306e\u9023\u643a\u304c\u5bb9\u6613<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-2\">\u30c6\u30b9\u30c8\u99c6\u52d5\u958b\u767a(TDD)\u3068PHPUnit\u306e\u76f8\u6027<\/h3>\n\n\n\n<p>PHPUnit\u306f\u3001\u30c6\u30b9\u30c8\u99c6\u52d5\u958b\u767a\uff08TDD\uff09\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3068\u975e\u5e38\u306b\u76f8\u6027\u304c\u826f\u3044\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002TDD\u306e\u57fa\u672c\u30b5\u30a4\u30af\u30eb\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Red<\/strong>: \u307e\u305a\u5931\u6557\u3059\u308b\u30c6\u30b9\u30c8\u3092\u66f8\u304f<\/li>\n\n\n\n<li><strong>Green<\/strong>: \u30c6\u30b9\u30c8\u304c\u6210\u529f\u3059\u308b\u3088\u3046\u306b\u6700\u5c0f\u9650\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u88c5\u3059\u308b<\/li>\n\n\n\n<li><strong>Refactor<\/strong>: \u30b3\u30fc\u30c9\u3092\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3057\u306a\u304c\u3089\u30c6\u30b9\u30c8\u304c\u6210\u529f\u3057\u7d9a\u3051\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b<\/li>\n<\/ol>\n\n\n\n<p>PHPUnit\u306f\u3053\u306e\u30b5\u30a4\u30af\u30eb\u3092\u52b9\u7387\u7684\u306b\u56de\u3059\u305f\u3081\u306e\u6a5f\u80fd\u3092\u5099\u3048\u3066\u3044\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u4f8b\uff1aTDD\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u30e6\u30fc\u30b6\u30fc\u30af\u30e9\u30b9\u3092\u30c6\u30b9\u30c8\nclass UserTest extends PHPUnit\\Framework\\TestCase\n{\n    public function testUserHasName()\n    {\n        \/\/ 1. Red: \u30c6\u30b9\u30c8\u3092\u66f8\u304f\uff08\u3053\u306e\u6642\u70b9\u3067\u306fUser\u30af\u30e9\u30b9\u306f\u5b9f\u88c5\u3055\u308c\u3066\u3044\u306a\u3044\uff09\n        $user = new User('John Doe');\n        $this-&gt;assertEquals('John Doe', $user-&gt;getName());\n    }\n}\n<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u30c6\u30b9\u30c8\u3092\u5148\u306b\u66f8\u304d\u3001\u305d\u306e\u5f8c\u5b9f\u88c5\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u660e\u78ba\u306a\u8981\u4ef6\u5b9a\u7fa9\u3068\u30d0\u30b0\u306e\u5c11\u306a\u3044\u30b3\u30fc\u30c9\u958b\u767a\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-3\">\u5358\u4f53\u30c6\u30b9\u30c8\u304c\u3082\u305f\u3089\u3059\u30b3\u30fc\u30c9\u54c1\u8cea\u3068\u958b\u767a\u52b9\u7387\u306e\u5411\u4e0a<\/h3>\n\n\n\n<p>PHPUnit\u3092\u7528\u3044\u305f\u5358\u4f53\u30c6\u30b9\u30c8\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u591a\u304f\u306e\u30e1\u30ea\u30c3\u30c8\u3092\u3082\u305f\u3089\u3057\u307e\u3059\uff1a<\/p>\n\n\n<div id=\"id-55216e37-d94c-45d2-ba51-6c8eaa5ebe46\">\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u30e1\u30ea\u30c3\u30c8<\/th><th>\u8aac\u660e<\/th><\/tr><\/thead><tbody><tr><td><strong>\u30d0\u30b0\u306e\u65e9\u671f\u767a\u898b<\/strong><\/td><td>\u958b\u767a\u521d\u671f\u6bb5\u968e\u3067\u30d0\u30b0\u3092\u691c\u51fa\u3057\u3001\u4fee\u6b63\u30b3\u30b9\u30c8\u3092\u4f4e\u6e1b<\/td><\/tr><tr><td><strong>\u56de\u5e30\u30c6\u30b9\u30c8<\/strong><\/td><td>\u65e2\u5b58\u6a5f\u80fd\u304c\u65b0\u6a5f\u80fd\u8ffd\u52a0\u306b\u3088\u3063\u3066\u58ca\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u78ba\u8a8d<\/td><\/tr><tr><td><strong>\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u306e\u5b89\u5168\u6027<\/strong><\/td><td>\u30b3\u30fc\u30c9\u6539\u5584\u6642\u306b\u6a5f\u80fd\u304c\u4fdd\u6301\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d<\/td><\/tr><tr><td><strong>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068\u3057\u3066\u306e\u5f79\u5272<\/strong><\/td><td>\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u304c\u4ed5\u69d8\u66f8\u3068\u3057\u3066\u3082\u6a5f\u80fd\u3057\u3001\u4ed6\u306e\u958b\u767a\u8005\u306e\u7406\u89e3\u3092\u52a9\u3051\u308b<\/td><\/tr><tr><td><strong>\u8a2d\u8a08\u306e\u6539\u5584<\/strong><\/td><td>\u30c6\u30b9\u30c8\u5bb9\u6613\u6027\u3092\u8003\u616e\u3057\u305f\u8a2d\u8a08\u3067\u3001\u7d50\u5408\u5ea6\u306e\u4f4e\u3044\u30e2\u30b8\u30e5\u30fc\u30eb\u5316\u3055\u308c\u305f\u30b3\u30fc\u30c9\u3092\u4fc3\u9032<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div>\n\n\n<p>\u4f8b\u3048\u3070\u3001PHPUnit\u3092\u4f7f\u3063\u3066\u8a08\u7b97\u30af\u30e9\u30b9\u3092\u30c6\u30b9\u30c8\u3059\u308b\u5834\u5408\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u96fb\u5353\u30af\u30e9\u30b9\u306e\u30c6\u30b9\u30c8\u4f8b\npublic function testAddition()\n{\n    $calculator = new Calculator();\n    $this-&gt;assertEquals(5, $calculator-&gt;add(2, 3));\n    \/\/ \u3053\u306e\u30c6\u30b9\u30c8\u306f\u52a0\u7b97\u6a5f\u80fd\u306e\u4ed5\u69d8\u3092\u660e\u78ba\u306b\u793a\u3057\u3066\u3044\u308b\n}\n<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001PHPUnit\u306f\u30b3\u30fc\u30c9\u304c\u610f\u56f3\u3057\u305f\u3068\u304a\u308a\u306b\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u958b\u767a\u30d7\u30ed\u30bb\u30b9\u5168\u4f53\u3092\u6539\u5584\u3057\u3001\u3088\u308a\u5805\u7262\u3067\u4fdd\u5b88\u6027\u306e\u9ad8\u3044PHP\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u767a\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-4\">PHPUnit\u306e\u74b0\u5883\u69cb\u7bc9 \u2013 \u8fc5\u901f\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u65b9\u6cd5<\/h2>\n\n\n\n<p>PHPUnit\u5c0e\u5165\u306e\u7b2c\u4e00\u6b69\u306f\u9069\u5207\u306a\u74b0\u5883\u69cb\u7bc9\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u8fc5\u901f\u304b\u3064\u78ba\u5b9f\u306bPHPUnit\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-5\">Composer\u3092\u4f7f\u3063\u305f\u6700\u65b0\u7248PHPUnit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806<\/h3>\n\n\n\n<p>Composer\u306f\u73fe\u4ee3\u306ePHP\u958b\u767a\u306b\u304a\u3044\u3066\u6a19\u6e96\u7684\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u30c4\u30fc\u30eb\u3067\u3042\u308a\u3001PHPUnit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3082\u6700\u9069\u3067\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306bPHPUnit\u3092\u5c0e\u5165\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u306b\u5f93\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5358\u4f4d\u3067\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u63a8\u5968\uff09<\/strong>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u5b9f\u884c\ncomposer require --dev phpunit\/phpunit ^10.0\n<\/pre>\n\n\n\n<p>\u3053\u306e\u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u3001\u958b\u767a\u74b0\u5883\u7528\u306e\u4f9d\u5b58\u95a2\u4fc2\u3068\u3057\u3066PHPUnit 10.x\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3067\u304d\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># vendor\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306ePHPUnit\u3092\u4f7f\u7528\n.\/vendor\/bin\/phpunit\n<\/pre>\n\n\n\n<p><strong>\u30b0\u30ed\u30fc\u30d0\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u5fc5\u8981\u306a\u5834\u5408\uff09<\/strong>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">composer global require phpunit\/phpunit ^10.0\n<\/pre>\n\n\n\n<p>\u30b0\u30ed\u30fc\u30d0\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3067\u304d\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">phpunit\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-6\">PHPUnit\u306e\u57fa\u672c\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30ebphpunit.xml\u306e\u66f8\u304d\u65b9<\/h3>\n\n\n\n<p>PHPUnit\u306e\u8a2d\u5b9a\u306f<code>phpunit.xml<\/code>\u307e\u305f\u306f<code>phpunit.xml.dist<\/code>\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u914d\u7f6e\u3059\u308b\u306e\u304c\u4e00\u822c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u57fa\u672c\u7684\u306a<code>phpunit.xml<\/code>\u306e\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;phpunit xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n         xsi:noNamespaceSchemaLocation=\"https:\/\/schema.phpunit.de\/10.0\/phpunit.xsd\"\n         bootstrap=\"vendor\/autoload.php\"\n         colors=\"true\"&gt;\n    &lt;!-- \u30c6\u30b9\u30c8\u30b9\u30a4\u30fc\u30c8\u306e\u5b9a\u7fa9 --&gt;\n    &lt;testsuites&gt;\n        &lt;testsuite name=\"Project Test Suite\"&gt;\n            &lt;directory&gt;tests&lt;\/directory&gt;\n        &lt;\/testsuite&gt;\n    &lt;\/testsuites&gt;\n    \n    &lt;!-- \u30c6\u30b9\u30c8\u30ab\u30d0\u30ec\u30c3\u30b8\u8a2d\u5b9a --&gt;\n    &lt;coverage&gt;\n        &lt;include&gt;\n            &lt;directory suffix=\".php\"&gt;src&lt;\/directory&gt;\n        &lt;\/include&gt;\n    &lt;\/coverage&gt;\n    \n    &lt;!-- PHP\u8a2d\u5b9a --&gt;\n    &lt;php&gt;\n        &lt;env name=\"APP_ENV\" value=\"testing\"\/&gt;\n        &lt;ini name=\"display_errors\" value=\"true\"\/&gt;\n    &lt;\/php&gt;\n&lt;\/phpunit&gt;\n<\/pre>\n\n\n\n<p>\u4e3b\u306a\u8a2d\u5b9a\u9805\u76ee\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n\n\n<div id=\"id-23de38fe-b9bb-4411-9818-c56637682b04\">\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u8a2d\u5b9a\u9805\u76ee<\/th><th>\u8aac\u660e<\/th><\/tr><\/thead><tbody><tr><td>bootstrap<\/td><td>\u30aa\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc\u306a\u3069\u3001\u30c6\u30b9\u30c8\u524d\u306b\u8aad\u307f\u8fbc\u3080\u30d5\u30a1\u30a4\u30eb<\/td><\/tr><tr><td>testsuites<\/td><td>\u30c6\u30b9\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3084\u30d5\u30a1\u30a4\u30eb\u306e\u6307\u5b9a<\/td><\/tr><tr><td>coverage<\/td><td>\u30b3\u30fc\u30c9\u30ab\u30d0\u30ec\u30c3\u30b8\u8a08\u6e2c\u306e\u8a2d\u5b9a<\/td><\/tr><tr><td>php<\/td><td>\u30c6\u30b9\u30c8\u5b9f\u884c\u6642\u306ePHP\u74b0\u5883\u5909\u6570\u3084\u8a2d\u5b9a<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"i-7\">\u7570\u306a\u308bPHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u4e92\u63db\u6027\u3068\u6ce8\u610f\u70b9<\/h3>\n\n\n\n<p>PHPUnit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u306f\u4e92\u63db\u6027\u304c\u3042\u308a\u3001\u9069\u5207\u306a\u7d44\u307f\u5408\u308f\u305b\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\uff1a<\/p>\n\n\n<div id=\"id-cefba5d8-d354-4604-8739-b6ace27e6b6a\">\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>PHP\u30d0\u30fc\u30b8\u30e7\u30f3<\/th><th>\u63a8\u5968PHPUnit\u30d0\u30fc\u30b8\u30e7\u30f3<\/th><\/tr><\/thead><tbody><tr><td>PHP 8.3\/8.2<\/td><td>PHPUnit 10.x<\/td><\/tr><tr><td>PHP 8.1\/8.0<\/td><td>PHPUnit 9.x<\/td><\/tr><tr><td>PHP 7.4\/7.3<\/td><td>PHPUnit 8.x<\/td><\/tr><tr><td>PHP 7.2\/7.1<\/td><td>PHPUnit 7.x<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div>\n\n\n<p>\u6ce8\u610f\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6700\u65b0\u306ePHPUnit 10\u7cfb\u306fPHP 8.1\u4ee5\u4e0a\u304c\u5fc5\u8981\u3067\u3059<\/li>\n\n\n\n<li>\u53e4\u3044PHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u5bfe\u5fdc\u3059\u308bPHPUnit\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u660e\u793a\u7684\u306b\u6307\u5b9a\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044<\/li>\n\n\n\n<li>\u30d0\u30fc\u30b8\u30e7\u30f3\u9593\u3067\u306f\u69cb\u6587\u3084\u6a5f\u80fd\u306b\u5dee\u7570\u304c\u3042\u308b\u305f\u3081\u3001\u79fb\u884c\u6642\u306b\u306f\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306e\u4fee\u6b63\u304c\u5fc5\u8981\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059<\/li>\n<\/ul>\n\n\n\n<p>\u74b0\u5883\u69cb\u7bc9\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u306f\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u306e\u4f5c\u6210\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-8\">PHPUnit\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9 \u2013 \u6700\u521d\u306e\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u4f5c\u6210<\/h2>\n\n\n\n<p>\u74b0\u5883\u69cb\u7bc9\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u3044\u3088\u3044\u3088PHPUnit\u3092\u4f7f\u3063\u305f\u6700\u521d\u306e\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u3053\u3053\u3067\u306f\u30c6\u30b9\u30c8\u30af\u30e9\u30b9\u306e\u57fa\u672c\u69cb\u9020\u304b\u3089\u3001\u30c6\u30b9\u30c8\u306e\u5b9f\u884c\u65b9\u6cd5\u3001\u7d50\u679c\u306e\u78ba\u8a8d\u307e\u3067\u9806\u3092\u8ffd\u3063\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-9\">\u30c6\u30b9\u30c8\u30af\u30e9\u30b9\u3068\u30c6\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u306e\u547d\u540d\u898f\u5247\u3068\u69cb\u9020<\/h3>\n\n\n\n<p>PHPUnit\u306e\u30c6\u30b9\u30c8\u30af\u30e9\u30b9\u306f\u3001<code>PHPUnit\\Framework\\TestCase<\/code>\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3057\u3066\u4f5c\u6210\u3057\u307e\u3059\u3002\u547d\u540d\u898f\u5247\u3068\u57fa\u672c\u69cb\u9020\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\/\/ \u30d5\u30a1\u30a4\u30eb\u540d: CalculatorTest.php\n\/\/ \u30af\u30e9\u30b9\u540d\u306f\u30c6\u30b9\u30c8\u5bfe\u8c61+'Test'\u3068\u3059\u308b\u306e\u304c\u4e00\u822c\u7684\nuse PHPUnit\\Framework\\TestCase;\n\nclass CalculatorTest extends TestCase\n{\n    \/\/ \u30c6\u30b9\u30c8\u524d\u306e\u6e96\u5099\u51e6\u7406\uff08\u5404\u30c6\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u5b9f\u884c\u524d\u306b\u547c\u3070\u308c\u308b\uff09\n    protected function setUp(): void\n    {\n        \/\/ \u30c6\u30b9\u30c8\u306b\u5fc5\u8981\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u521d\u671f\u5316\u306a\u3069\n    }\n    \n    \/\/ \u30c6\u30b9\u30c8\u5f8c\u306e\u5f8c\u7247\u4ed8\u3051\u51e6\u7406\uff08\u5404\u30c6\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u5b9f\u884c\u5f8c\u306b\u547c\u3070\u308c\u308b\uff09\n    protected function tearDown(): void\n    {\n        \/\/ \u30c6\u30b9\u30c8\u3067\u4f5c\u6210\u3057\u305f\u30ea\u30bd\u30fc\u30b9\u306e\u89e3\u653e\u306a\u3069\n    }\n    \n    \/\/ \u30c6\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9: 'test'\u3067\u59cb\u307e\u308b\u30e1\u30bd\u30c3\u30c9\u540d\n    public function testAddition()\n    {\n        $calculator = new Calculator();\n        $result = $calculator-&gt;add(2, 3);\n        $this-&gt;assertEquals(5, $result);\n    }\n    \n    \/\/ \u307e\u305f\u306f @test \u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\n    \/** @test *\/\n    public function multiplicationWorks()\n    {\n        $calculator = new Calculator();\n        $result = $calculator-&gt;multiply(2, 3);\n        $this-&gt;assertEquals(6, $result);\n    }\n}\n<\/pre>\n\n\n\n<p>\u30c6\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u306e\u547d\u540d\u306b\u306f\u4ee5\u4e0b\u306e\u30eb\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u300ctest\u300d\u3067\u59cb\u307e\u308b\u30e1\u30bd\u30c3\u30c9\u540d<\/li>\n\n\n\n<li>\u307e\u305f\u306f <code>@test<\/code> \u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u305f\u30e1\u30bd\u30c3\u30c9<\/li>\n\n\n\n<li>\u30e1\u30bd\u30c3\u30c9\u540d\u306f\u52d5\u4f5c\u3092\u8aac\u660e\u3059\u308b\u610f\u5473\u306e\u3042\u308b\u540d\u524d\u304c\u671b\u307e\u3057\u3044\uff08\u4f8b\uff1a<code>testUserCanLogin<\/code>\uff09<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-10\">assert\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u69d8\u3005\u306a\u691c\u8a3c\u65b9\u6cd5<\/h3>\n\n\n\n<p>PHPUnit\u3067\u306f\u69d8\u3005\u306a<code>assert<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3001\u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u671f\u5f85\u5024\u3092\u691c\u8a3c\u3057\u307e\u3059\u3002\u4ee3\u8868\u7684\u306a\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\uff1a<\/p>\n\n\n<div id=\"id-75c9b1b7-70ed-496d-b393-02d0bf6ef4fd\">\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u30e1\u30bd\u30c3\u30c9<\/th><th>\u7528\u9014<\/th><th>\u4f8b<\/th><\/tr><\/thead><tbody><tr><td><code>assertEquals($expected, $actual)<\/code><\/td><td>\u5024\u304c\u7b49\u3057\u3044\u304b\u691c\u8a3c\uff08==\uff09<\/td><td><code>$this-&gt;assertEquals(5, $sum);<\/code><\/td><\/tr><tr><td><code>assertSame($expected, $actual)<\/code><\/td><td>\u5024\u3068\u578b\u304c\u7b49\u3057\u3044\u304b\u691c\u8a3c\uff08===\uff09<\/td><td><code>$this-&gt;assertSame(true, $isValid);<\/code><\/td><\/tr><tr><td><code>assertTrue($condition)<\/code><\/td><td>\u6761\u4ef6\u304c true \u304b\u691c\u8a3c<\/td><td><code>$this-&gt;assertTrue($user-&gt;isActive());<\/code><\/td><\/tr><tr><td><code>assertFalse($condition)<\/code><\/td><td>\u6761\u4ef6\u304c false \u304b\u691c\u8a3c<\/td><td><code>$this-&gt;assertFalse($cart-&gt;isEmpty());<\/code><\/td><\/tr><tr><td><code>assertNull($actual)<\/code><\/td><td>\u5024\u304c null \u304b\u691c\u8a3c<\/td><td><code>$this-&gt;assertNull($result);<\/code><\/td><\/tr><tr><td><code>assertInstanceOf($expected, $actual)<\/code><\/td><td>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6307\u5b9a\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304b\u691c\u8a3c<\/td><td><code>$this-&gt;assertInstanceOf(User::class, $user);<\/code><\/td><\/tr><tr><td><code>assertContains($needle, $haystack)<\/code><\/td><td>\u914d\u5217\u30fb\u30a4\u30c6\u30e9\u30d6\u30eb\u306b\u8981\u7d20\u304c\u542b\u307e\u308c\u308b\u304b\u691c\u8a3c<\/td><td><code>$this-&gt;assertContains('apple', $fruits);<\/code><\/td><\/tr><tr><td><code>assertCount($expectedCount, $haystack)<\/code><\/td><td>\u914d\u5217\u30fb\u30a4\u30c6\u30e9\u30d6\u30eb\u306e\u8981\u7d20\u6570\u3092\u691c\u8a3c<\/td><td><code>$this-&gt;assertCount(3, $users);<\/code><\/td><\/tr><tr><td><code>assertStringContainsString($needle, $haystack)<\/code><\/td><td>\u6587\u5b57\u5217\u304c\u7279\u5b9a\u306e\u90e8\u5206\u6587\u5b57\u5217\u3092\u542b\u3080\u304b\u691c\u8a3c<\/td><td><code>$this-&gt;assertStringContainsString('PHP', $title);<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div>\n\n\n<p>\u30c6\u30b9\u30c8\u3067\u30c7\u30fc\u30bf\u3092\u7e70\u308a\u8fd4\u3057\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u30c7\u30fc\u30bf\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u304c\u4fbf\u5229\u3067\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/**\n * @dataProvider additionProvider\n *\/\npublic function testAddition($a, $b, $expected)\n{\n    $calculator = new Calculator();\n    $this-&gt;assertEquals($expected, $calculator-&gt;add($a, $b));\n}\n\n\/\/ \u30c7\u30fc\u30bf\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u30e1\u30bd\u30c3\u30c9 - \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u63d0\u4f9b\npublic function additionProvider()\n{\n    return [\n        'positive numbers' =&gt; [1, 2, 3],\n        'negative numbers' =&gt; [-1, -2, -3],\n        'mixed numbers' =&gt; [1, -2, -1]\n    ];\n}\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-11\">\u30c6\u30b9\u30c8\u5b9f\u884c\u3068\u30ec\u30dd\u30fc\u30c8\u51fa\u529b\u306e\u30b3\u30de\u30f3\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3<\/h3>\n\n\n\n<p>PHPUnit\u306e\u30c6\u30b9\u30c8\u306f\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002\u4e3b\u306a\u30b3\u30de\u30f3\u30c9\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u57fa\u672c\u7684\u306a\u5b9f\u884c\u65b9\u6cd5\n.\/vendor\/bin\/phpunit\n\n# \u7279\u5b9a\u306e\u30c6\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\n.\/vendor\/bin\/phpunit tests\/CalculatorTest.php\n\n# \u7279\u5b9a\u306e\u30c6\u30b9\u30c8\u30e1\u30bd\u30c3\u30c9\u3060\u3051\u3092\u5b9f\u884c\n.\/vendor\/bin\/phpunit --filter testAddition CalculatorTest\n\n# \u30b0\u30eb\u30fc\u30d7\u5358\u4f4d\u3067\u5b9f\u884c (@group \u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3067\u5b9a\u7fa9)\n.\/vendor\/bin\/phpunit --group slow\n\n# \u30c6\u30b9\u30c8\u30ab\u30d0\u30ec\u30c3\u30b8\u30ec\u30dd\u30fc\u30c8\u3092HTML\u5f62\u5f0f\u3067\u51fa\u529b\n.\/vendor\/bin\/phpunit --coverage-html .\/coverage\n<\/pre>\n\n\n\n<p>\u30c6\u30b9\u30c8\u5b9f\u884c\u7d50\u679c\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u8868\u793a\u3055\u308c\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">PHPUnit 10.0.0 by Sebastian Bergmann and contributors.\n\n....F.                                                              6 \/ 6 (100%)\n\nTime: 00:00.003, Memory: 4.00 MB\n\nThere was 1 failure:\n\n1) CalculatorTest::testDivision\nFailed asserting that 2 is identical to '2'.\n\nFAILURES!\nTests: 6, Assertions: 6, Failures: 1.\n<\/pre>\n\n\n\n<p>\u4e0a\u8a18\u306e\u5b9f\u884c\u7d50\u679c\u3067\u306f\u30016\u3064\u306e\u30c6\u30b9\u30c8\u306e\u3046\u30611\u3064\u304c\u5931\u6557\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u5b9f\u884c\u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u8a18\u53f7\u3067\u793a\u3055\u308c\u307e\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>.<\/code> (\u30c9\u30c3\u30c8): \u30c6\u30b9\u30c8\u6210\u529f<\/li>\n\n\n\n<li><code>F<\/code>: \u30c6\u30b9\u30c8\u5931\u6557<\/li>\n\n\n\n<li><code>E<\/code>: \u30c6\u30b9\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u767a\u751f<\/li>\n\n\n\n<li><code>S<\/code>: \u30c6\u30b9\u30c8\u304c\u30b9\u30ad\u30c3\u30d7\u3055\u308c\u305f<\/li>\n\n\n\n<li><code>I<\/code>: \u30c6\u30b9\u30c8\u304c\u4e0d\u5b8c\u5168\u307e\u305f\u306f\u5b9f\u88c5\u3055\u308c\u3066\u3044\u306a\u3044<\/li>\n<\/ul>\n\n\n\n<p>\u30c6\u30b9\u30c8\u7d50\u679c\u306b\u57fa\u3065\u3044\u3066\u30b3\u30fc\u30c9\u3092\u4fee\u6b63\u3057\u3001\u3059\u3079\u3066\u306e\u30c6\u30b9\u30c8\u304c\u6210\u529f\u3059\u308b\u307e\u3067\u7d99\u7d9a\u7684\u306b\u6539\u5584\u3057\u3066\u3044\u304f\u3053\u3068\u304cPHPUnit\u3092\u4f7f\u3063\u305f\u958b\u767a\u306e\u57fa\u672c\u7684\u306a\u30b5\u30a4\u30af\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-12\">PHPUnit\u3092\u4f7f\u3063\u305f\u30e2\u30c3\u30af\u3068\u30b9\u30bf\u30d6\u306e\u6d3b\u7528\u6cd5<\/h2>\n\n\n\n<p>\u5b9f\u969b\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u3067\u306f\u3001\u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u30af\u30e9\u30b9\u304c\u5916\u90e8\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001API\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306a\u3069\u306b\u4f9d\u5b58\u3059\u308b\u3053\u3068\u304c\u4e00\u822c\u7684\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u5916\u90e8\u4f9d\u5b58\u3092\u30c6\u30b9\u30c8\u6642\u306b\u5b9f\u969b\u306b\u4f7f\u7528\u3059\u308b\u3068\u3001\u30c6\u30b9\u30c8\u304c\u9045\u304f\u306a\u3063\u305f\u308a\u4e0d\u5b89\u5b9a\u306b\u306a\u3063\u305f\u308a\u3059\u308b\u554f\u984c\u304c\u3042\u308a\u307e\u3059\u3002PHPUnit\u306e\u30e2\u30c3\u30af\u3068\u30b9\u30bf\u30d6\u306f\u3053\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3057\u3001\u5916\u90e8\u4f9d\u5b58\u3092\u6301\u3064\u30b3\u30fc\u30c9\u3092\u52b9\u7387\u7684\u306b\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\u306e\u5f37\u529b\u306a\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-13\">\u5916\u90e8\u4f9d\u5b58\u3092\u6301\u3064\u30b3\u30fc\u30c9\u3092\u52b9\u679c\u7684\u306b\u30c6\u30b9\u30c8\u3059\u308b\u65b9\u6cd5<\/h3>\n\n\n\n<p>\u30e2\u30c3\u30af\u3068\u30b9\u30bf\u30d6\u306f\u4e21\u65b9\u3068\u3082\u30c6\u30b9\u30c8\u30c0\u30d6\u30eb\uff08\u30c6\u30b9\u30c8\u7528\u306e\u4ee3\u5f79\uff09\u3067\u3059\u304c\u3001\u305d\u306e\u4f7f\u3044\u65b9\u306b\u306f\u9055\u3044\u304c\u3042\u308a\u307e\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30b9\u30bf\u30d6<\/strong>: \u7279\u5b9a\u306e\u30e1\u30bd\u30c3\u30c9\u547c\u3073\u51fa\u3057\u306b\u5bfe\u3057\u3066\u5b9a\u7fa9\u3055\u308c\u305f\u5fdc\u7b54\u3092\u8fd4\u3059\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/li>\n\n\n\n<li><strong>\u30e2\u30c3\u30af<\/strong>: \u30b9\u30bf\u30d6\u306e\u6a5f\u80fd\u306b\u52a0\u3048\u3066\u3001\u671f\u5f85\u3055\u308c\u308b\u52d5\u4f5c\uff08\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3070\u308c\u308b\u304b\u3069\u3046\u304b\u3001\u4f55\u56de\u547c\u3070\u308c\u308b\u304b\u306a\u3069\uff09\u3092\u691c\u8a3c\u3059\u308b\u6a5f\u80fd\u3082\u6301\u3064\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/li>\n<\/ul>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001PHPUnit\u3067\u30e2\u30c3\u30af\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u57fa\u672c\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ UserService\u30af\u30e9\u30b9\u306e\u30e2\u30c3\u30af\u5316\u4f8b\npublic function testNotifyUser()\n{\n    \/\/ \u30e2\u30c3\u30af\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210\n    $emailService = $this-&gt;createMock(EmailService::class);\n    \n    \/\/ \u30e2\u30c3\u30af\u306e\u632f\u308b\u821e\u3044\u3092\u8a2d\u5b9a\n    $emailService-&gt;expects($this-&gt;once()) \/\/ \u30e1\u30bd\u30c3\u30c9\u304c1\u56de\u3060\u3051\u547c\u3070\u308c\u308b\u3053\u3068\u3092\u671f\u5f85\n               -&gt;method('sendEmail')      \/\/ sendEmail\u30e1\u30bd\u30c3\u30c9\u306b\u5bfe\u3057\u3066\n               -&gt;with(                    \/\/ \u7279\u5b9a\u306e\u5f15\u6570\u3067\u547c\u3070\u308c\u308b\u3053\u3068\u3092\u671f\u5f85\n                   $this-&gt;equalTo('user@example.com'),\n                   $this-&gt;anything()      \/\/ 2\u756a\u76ee\u306e\u5f15\u6570\u306f\u4f55\u3067\u3082OK\n               )\n               -&gt;willReturn(true);        \/\/ true\u3092\u8fd4\u3059\u3088\u3046\u306b\u8a2d\u5b9a\n    \n    \/\/ \u30e2\u30c3\u30af\u3092\u6ce8\u5165\u3057\u3066\u30c6\u30b9\u30c8\u5bfe\u8c61\u3092\u5b9f\u884c\n    $userService = new UserService($emailService);\n    $result = $userService-&gt;notifyUser('user@example.com', 'Hello!');\n    \n    $this-&gt;assertTrue($result);\n}\n<\/pre>\n\n\n\n<p>\u3088\u308a\u8a73\u7d30\u306a\u30e2\u30c3\u30af\u8a2d\u5b9a\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u3001<code>getMockBuilder<\/code>\u3092\u4f7f\u7528\u3057\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$emailService = $this-&gt;getMockBuilder(EmailService::class)\n                     -&gt;disableOriginalConstructor() \/\/ \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u7121\u52b9\u5316\n                     -&gt;onlyMethods(['sendEmail'])   \/\/ \u30e2\u30c3\u30af\u5316\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u6307\u5b9a\n                     -&gt;getMock();\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-14\">Database\u3084API\u30a2\u30af\u30bb\u30b9\u306e\u30e2\u30c3\u30af\u5316\u30c6\u30af\u30cb\u30c3\u30af<\/h3>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a2\u30af\u30bb\u30b9\u3084API\u30ea\u30af\u30a8\u30b9\u30c8\u306a\u3069\u306e\u5916\u90e8\u4f9d\u5b58\u306e\u30e2\u30c3\u30af\u5316\u306f\u3001\u7279\u306b\u91cd\u8981\u3067\u3059\u3002\u4ee5\u4e0b\u306f\u4e3b\u306a\u30e2\u30c3\u30af\u5316\u30c6\u30af\u30cb\u30c3\u30af\u3067\u3059\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-15\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a2\u30af\u30bb\u30b9\u306e\u30e2\u30c3\u30af\u5316\uff1a<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u30ea\u30dd\u30b8\u30c8\u30ea\u30af\u30e9\u30b9\u306e\u30e2\u30c3\u30af\u5316\u4f8b\npublic function testUserRegistration()\n{\n    \/\/ \u30ea\u30dd\u30b8\u30c8\u30ea\u30e2\u30c3\u30af\u306e\u4f5c\u6210\u3068\u8a2d\u5b9a\n    $userRepository = $this-&gt;createMock(UserRepository::class);\n    $userRepository-&gt;method('findByEmail')\n                  -&gt;with('new@example.com')\n                  -&gt;willReturn(null); \/\/ \u65e2\u5b58\u30e6\u30fc\u30b6\u30fc\u304c\u3044\u306a\u3044\u3068\u4eee\u5b9a\n    \n    $userRepository-&gt;method('save')\n                  -&gt;will($this-&gt;returnCallback(function($user) {\n                      \/\/ \u4fdd\u5b58\u51e6\u7406\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\n                      $user-&gt;setId(123); \/\/ ID\u3092\u8a2d\u5b9a\n                      return true;\n                  }));\n    \n    \/\/ \u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u30af\u30e9\u30b9\u306b\u30e2\u30c3\u30af\u3092\u6ce8\u5165\n    $userService = new UserService($userRepository);\n    $newUser = $userService-&gt;register('new@example.com', 'password123');\n    \n    $this-&gt;assertEquals(123, $newUser-&gt;getId());\n}\n<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-16\">\u5916\u90e8API\u306e\u30e2\u30c3\u30af\u5316\uff1a<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public function testPaymentProcessing()\n{\n    \/\/ \u652f\u6255\u3044\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4API\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30e2\u30c3\u30af\n    $paymentGateway = $this-&gt;createMock(PaymentGatewayClient::class);\n    \n    \/\/ \u9023\u7d9a\u3057\u305f\u547c\u3073\u51fa\u3057\u306b\u5bfe\u3057\u3066\u7570\u306a\u308b\u5fdc\u7b54\u3092\u8a2d\u5b9a\n    $paymentGateway-&gt;method('processPayment')\n                  -&gt;withConsecutive(\n                      [$this-&gt;equalTo(100), $this-&gt;anything()],\n                      [$this-&gt;equalTo(200), $this-&gt;anything()]\n                  )\n                  -&gt;willReturnOnConsecutiveCalls(\n                      ['status' =&gt; 'success', 'transaction_id' =&gt; 'tx_123'],\n                      ['status' =&gt; 'failed', 'error' =&gt; 'insufficient_funds']\n                  );\n    \n    $paymentService = new PaymentService($paymentGateway);\n    \n    \/\/ 1\u56de\u76ee\u306e\u547c\u3073\u51fa\u3057\uff08\u6210\u529f\uff09\n    $result1 = $paymentService-&gt;processOrder(['amount' =&gt; 100]);\n    $this-&gt;assertTrue($result1-&gt;isSuccessful());\n    \n    \/\/ 2\u56de\u76ee\u306e\u547c\u3073\u51fa\u3057\uff08\u5931\u6557\uff09\n    $result2 = $paymentService-&gt;processOrder(['amount' =&gt; 200]);\n    $this-&gt;assertFalse($result2-&gt;isSuccessful());\n}\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-17\">\u30e2\u30c3\u30af\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u3075\u308b\u307e\u3044\u3092\u5b9a\u7fa9\u3059\u308b\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h3>\n\n\n\n<p>\u30e2\u30c3\u30af\u3092\u52b9\u679c\u7684\u306b\u6d3b\u7528\u3059\u308b\u305f\u3081\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\uff1a<\/p>\n\n\n<div id=\"id-9568cff8-8a33-431b-9784-21ae4aa347b3\">\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/th><th>\u8aac\u660e<\/th><\/tr><\/thead><tbody><tr><td><strong>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u30e2\u30c3\u30af\u5316<\/strong><\/td><td>\u5177\u4f53\u7684\u306a\u5b9f\u88c5\u3067\u306f\u306a\u304f\u3001\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u5bfe\u3057\u3066\u30e2\u30c3\u30af\u3092\u4f5c\u6210\u3059\u308b<\/td><\/tr><tr><td><strong>\u5fc5\u8981\u6700\u5c0f\u9650\u306e\u30e2\u30c3\u30af\u5316<\/strong><\/td><td>\u30c6\u30b9\u30c8\u306b\u5fc5\u8981\u306a\u30e1\u30bd\u30c3\u30c9\u3060\u3051\u3092\u30e2\u30c3\u30af\u5316\u3057\u3001\u904e\u5270\u306a\u30e2\u30c3\u30af\u3092\u907f\u3051\u308b<\/td><\/tr><tr><td><strong>\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u306f\u9069\u5207\u306a\u7c92\u5ea6\u3067<\/strong><\/td><td>\u30e2\u30c3\u30af\u306e\u8a73\u7d30\u3059\u304e\u308b\u691c\u8a3c\u306f\u907f\u3051\u3001\u91cd\u8981\u306a\u632f\u308b\u821e\u3044\u306e\u307f\u3092\u691c\u8a3c\u3059\u308b<\/td><\/tr><tr><td><strong>\u30c6\u30b9\u30c8\u306e\u305f\u3081\u306e\u8a2d\u8a08<\/strong><\/td><td>\u4f9d\u5b58\u6027\u6ce8\u5165\u3092\u6d3b\u7528\u3057\u3001\u30c6\u30b9\u30c8\u5bb9\u6613\u6027\u3092\u8003\u616e\u3057\u305f\u8a2d\u8a08\u306b\u3059\u308b<\/td><\/tr><tr><td><strong>\u4e00\u8cab\u3057\u305f\u30e2\u30c3\u30af\u306e\u4f7f\u7528<\/strong><\/td><td>\u540c\u3058\u30c6\u30b9\u30c8\u30b9\u30a4\u30fc\u30c8\u5185\u3067\u306f\u4e00\u8cab\u3057\u305f\u30e2\u30c3\u30af\u6226\u7565\u3092\u4f7f\u7528\u3059\u308b<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div>\n\n\n<p>\u30e2\u30c3\u30af\u306e\u904e\u5270\u306a\u4f7f\u7528\u306f\u30c6\u30b9\u30c8\u306e\u4fdd\u5b88\u6027\u3092\u4f4e\u4e0b\u3055\u305b\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u305f\u3081\u3001\u9069\u5207\u306a\u30d0\u30e9\u30f3\u30b9\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u5916\u90e8\u4f9d\u5b58\u304c\u5c11\u306a\u304f\u3001\u30c6\u30b9\u30c8\u304c\u5bb9\u6613\u306a\u8a2d\u8a08\u3092\u76ee\u6307\u3057\u3064\u3064\u3001\u5fc5\u8981\u306a\u90e8\u5206\u3060\u3051\u3092\u30e2\u30c3\u30af\u5316\u3059\u308b\u30a2\u30d7\u30ed\u30fc\u30c1\u304c\u63a8\u5968\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-18\">\u30c6\u30b9\u30c8\u30ab\u30d0\u30ec\u30c3\u30b8\u306e\u5411\u4e0a \u2013 \u7db2\u7f85\u6027\u3092\u9ad8\u3081\u308b\u6226\u7565<\/h2>\n\n\n\n<p>\u30c6\u30b9\u30c8\u30ab\u30d0\u30ec\u30c3\u30b8\u306f\u3001\u30c6\u30b9\u30c8\u306b\u3088\u3063\u3066\u5b9f\u884c\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306e\u5272\u5408\u3092\u793a\u3059\u6307\u6a19\u3067\u3042\u308a\u3001\u30b3\u30fc\u30c9\u54c1\u8cea\u306e\u5411\u4e0a\u3068\u6f5c\u5728\u7684\u306a\u30d0\u30b0\u306e\u767a\u898b\u306b\u304a\u3044\u3066\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002PHPUnit\u3092\u4f7f\u3063\u3066\u30ab\u30d0\u30ec\u30c3\u30b8\u3092\u6e2c\u5b9a\u3057\u3001\u6226\u7565\u7684\u306b\u5411\u4e0a\u3055\u305b\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-19\">PHPUnit\u3067\u30ab\u30d0\u30ec\u30c3\u30b8\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210\u3059\u308b\u65b9\u6cd5<\/h3>\n\n\n\n<p>PHPUnit\u3067\u30ab\u30d0\u30ec\u30c3\u30b8\u30ec\u30dd\u30fc\u30c8\u3092\u751f\u6210\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u300cXdebug\u300d\u307e\u305f\u306f\u300cpcov\u300dPHP\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30ab\u30d0\u30ec\u30c3\u30b8\u30ec\u30dd\u30fc\u30c8\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u751f\u6210\u3067\u304d\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u306e\u30ab\u30d0\u30ec\u30c3\u30b8\u30ec\u30dd\u30fc\u30c8\uff08\u30b3\u30f3\u30bd\u30fc\u30eb\u51fa\u529b\uff09\n.\/vendor\/bin\/phpunit --coverage-text\n\n# HTML\u5f62\u5f0f\u306e\u30ab\u30d0\u30ec\u30c3\u30b8\u30ec\u30dd\u30fc\u30c8\uff08\u8996\u899a\u7684\u306a\u30ec\u30dd\u30fc\u30c8\uff09\n.\/vendor\/bin\/phpunit --coverage-html .\/coverage-report\n\n# XML\u5f62\u5f0f\uff08CI\u30c4\u30fc\u30eb\u3068\u306e\u9023\u643a\u7528\uff09\n.\/vendor\/bin\/phpunit --coverage-xml .\/coverage-xml\n\n# \u7279\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3084\u30d5\u30a1\u30a4\u30eb\u306e\u307f\u30ab\u30d0\u30ec\u30c3\u30b8\u6e2c\u5b9a\n.\/vendor\/bin\/phpunit --coverage-html .\/coverage-report --filter UserTest\n<\/pre>\n\n\n\n<p>HTML\u5f62\u5f0f\u306e\u30ec\u30dd\u30fc\u30c8\u306f\u7279\u306b\u6709\u7528\u3067\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u304c\u8996\u899a\u7684\u306b\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30ab\u30d0\u30ec\u30c3\u30b8\u306e\u30b5\u30de\u30ea\u30fc\uff08\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5168\u4f53\u306e\u72b6\u6cc1\uff09<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\u30fb\u30af\u30e9\u30b9\u30fb\u30e1\u30bd\u30c3\u30c9\u5225\u306e\u30ab\u30d0\u30ec\u30c3\u30b8\u7387<\/li>\n\n\n\n<li>\u30ab\u30d0\u30fc\u6e08\u307f\/\u672a\u30ab\u30d0\u30fc\u306e\u884c\u306e\u30cf\u30a4\u30e9\u30a4\u30c8\u8868\u793a<\/li>\n\n\n\n<li>\u5206\u5c90\u30ab\u30d0\u30ec\u30c3\u30b8\u306e\u8a73\u7d30<\/li>\n<\/ul>\n\n\n\n<p>\u30ab\u30d0\u30ec\u30c3\u30b8\u5bfe\u8c61\u304b\u3089\u9664\u5916\u3057\u305f\u3044\u30b3\u30fc\u30c9\u306b\u306f\u3001\u7279\u5225\u306a\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u30ab\u30d0\u30ec\u30c3\u30b8\u8a08\u6e2c\u304b\u3089\u9664\u5916\u3055\u308c\u308b\n\/** @codeCoverageIgnore *\/\npublic function complexLegacyMethod()\n{\n    \/\/ ...\n}\n\n\/\/ \u6761\u4ef6\u4ed8\u304d\u3067\u9664\u5916\u3059\u308b\u4f8b\n\/** @codeCoverageIgnoreIf PHP_VERSION_ID &lt; 80000 *\/\npublic function php8FeatureMethod()\n{\n    \/\/ ...\n}\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-20\">\u6761\u4ef6\u5206\u5c90\u3068\u30a8\u30c3\u30b8\u30b1\u30fc\u30b9\u3092\u78ba\u5b9f\u306b\u30c6\u30b9\u30c8\u3059\u308b\u30a2\u30d7\u30ed\u30fc\u30c1<\/h3>\n\n\n\n<p>\u9ad8\u3044\u30ab\u30d0\u30ec\u30c3\u30b8\u3092\u9054\u6210\u3059\u308b\u306b\u306f\u3001\u30b3\u30fc\u30c9\u306e\u3059\u3079\u3066\u306e\u7d4c\u8def\uff08\u7279\u306b\u6761\u4ef6\u5206\u5c90\uff09\u3092\u30c6\u30b9\u30c8\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u52b9\u679c\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-21\">1. \u30c7\u30fc\u30bf\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u6d3b\u7528\u3057\u305f\u7db2\u7f85\u7684\u30c6\u30b9\u30c8<\/h4>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u4f7f\u3063\u3066\u3001\u3055\u307e\u3056\u307e\u306a\u5165\u529b\u30d1\u30bf\u30fc\u30f3\u3092\u52b9\u7387\u7684\u306b\u30c6\u30b9\u30c8\u3067\u304d\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/**\n * @dataProvider inputProvider\n *\/\npublic function testValidateInput($input, $expectedResult)\n{\n    $validator = new InputValidator();\n    $this-&gt;assertSame($expectedResult, $validator-&gt;isValid($input));\n}\n\npublic function inputProvider()\n{\n    return [\n        'valid email' =&gt; ['test@example.com', true],\n        'invalid email' =&gt; ['invalid-email', false],\n        'empty string' =&gt; ['', false],\n        'null value' =&gt; [null, false],\n        'numeric input' =&gt; [123, false],\n        'special chars' =&gt; ['&lt;script&gt;', false],\n    ];\n}\n<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-22\">2. \u5883\u754c\u5024\u30c6\u30b9\u30c8<\/h4>\n\n\n\n<p>\u5883\u754c\u5024\u5468\u8fba\u306e\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u96c6\u4e2d\u7684\u306b\u4f5c\u6210\u3057\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public function testAgeValidation()\n{\n    $validator = new AgeValidator(18, 65); \/\/ 18\u301c65\u6b73\u304c\u6709\u52b9\u7bc4\u56f2\n    \n    \/\/ \u5883\u754c\u5024\u30c6\u30b9\u30c8\n    $this-&gt;assertFalse($validator-&gt;isValid(17)); \/\/ \u4e0b\u9650\u672a\u6e80\n    $this-&gt;assertTrue($validator-&gt;isValid(18)); \/\/ \u4e0b\u9650\u3061\u3087\u3046\u3069\n    $this-&gt;assertTrue($validator-&gt;isValid(19)); \/\/ \u4e0b\u9650+1\n    \n    $this-&gt;assertTrue($validator-&gt;isValid(64)); \/\/ \u4e0a\u9650-1\n    $this-&gt;assertTrue($validator-&gt;isValid(65)); \/\/ \u4e0a\u9650\u3061\u3087\u3046\u3069\n    $this-&gt;assertFalse($validator-&gt;isValid(66)); \/\/ \u4e0a\u9650\u8d85\u904e\n}\n<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-23\">3. \u4f8b\u5916\u30c6\u30b9\u30c8<\/h4>\n\n\n\n<p>\u4f8b\u5916\u304c\u767a\u751f\u3059\u308b\u30b1\u30fc\u30b9\u3082\u78ba\u5b9f\u306b\u30c6\u30b9\u30c8\u3057\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public function testDivisionByZeroThrowsException()\n{\n    $calculator = new Calculator();\n    \n    $this-&gt;expectException(DivisionByZeroException::class);\n    $calculator-&gt;divide(10, 0);\n}\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-24\">\u30ab\u30d0\u30ec\u30c3\u30b8\u76ee\u6a19\u306e\u8a2d\u5b9a\u3068\u6bb5\u968e\u7684\u306a\u6539\u5584\u30d7\u30ed\u30bb\u30b9<\/h3>\n\n\n\n<p>\u52b9\u679c\u7684\u306a\u30ab\u30d0\u30ec\u30c3\u30b8\u6226\u7565\u306b\u306f\u3001\u73fe\u5b9f\u7684\u306a\u76ee\u6a19\u8a2d\u5b9a\u3068\u6bb5\u968e\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u304c\u91cd\u8981\u3067\u3059\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u521d\u671f\u76ee\u6a19\u306e\u8a2d\u5b9a<\/strong>: \u307e\u305a\u306f60\u301c70%\u7a0b\u5ea6\u306e\u73fe\u5b9f\u7684\u306a\u30ab\u30d0\u30ec\u30c3\u30b8\u76ee\u6a19\u3092\u8a2d\u5b9a\u3057\u307e\u3059<\/li>\n\n\n\n<li><strong>\u91cd\u8981\u30b3\u30fc\u30c9\u306e\u512a\u5148<\/strong>: \u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3084\u8907\u96d1\u306a\u51e6\u7406\u3092\u542b\u3080\u30af\u30e9\u30b9\u3092\u512a\u5148\u3057\u3066\u30c6\u30b9\u30c8\u3057\u307e\u3059<\/li>\n\n\n\n<li><strong>CI\/CD\u3078\u306e\u7d71\u5408<\/strong>: \u30ab\u30d0\u30ec\u30c3\u30b8\u30ec\u30dd\u30fc\u30c8\u3092\u7d99\u7d9a\u7684\u30a4\u30f3\u30c6\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d7\u30ed\u30bb\u30b9\u306b\u7d44\u307f\u8fbc\u307f\u307e\u3059<\/li>\n\n\n\n<li><strong>\u6bb5\u968e\u7684\u306a\u6539\u5584<\/strong>: \u30ab\u30d0\u30ec\u30c3\u30b8\u76ee\u6a19\u3092\u5c11\u3057\u305a\u3064\u5f15\u304d\u4e0a\u3052\u3066\u3044\u304d\u307e\u3059\uff08\u4f8b\uff1a70%\u219275%\u219280%\uff09<\/li>\n\n\n\n<li><strong>\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3068\u306e\u9023\u643a<\/strong>: \u30b3\u30fc\u30c9\u6539\u5584\u6642\u306b\u540c\u6642\u306b\u30c6\u30b9\u30c8\u30ab\u30d0\u30ec\u30c3\u30b8\u3082\u5411\u4e0a\u3055\u305b\u307e\u3059<\/li>\n<\/ol>\n\n\n\n<p>\u30ab\u30d0\u30ec\u30c3\u30b8\u306e\u307f\u3092\u76ee\u6a19\u306b\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u30c6\u30b9\u30c8\u306e\u8cea\u3082\u91cd\u8996\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002100%\u306e\u30ab\u30d0\u30ec\u30c3\u30b8\u3067\u3082\u3001\u30c6\u30b9\u30c8\u306e\u8cea\u304c\u4f4e\u3051\u308c\u3070\u610f\u5473\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u91cd\u8981\u306a\u306e\u306f\u3001\u30d0\u30b0\u306e\u30ea\u30b9\u30af\u304c\u9ad8\u3044\u90e8\u5206\u3084\u8907\u96d1\u306a\u30ed\u30b8\u30c3\u30af\u306b\u5bfe\u3057\u3066\u5805\u7262\u306a\u30c6\u30b9\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-25\">\u5b9f\u8df5\u7684\u306aPHPUnit\u30c6\u30b9\u30c8\u4e8b\u4f8b \u2013 \u73fe\u5834\u3067\u4f7f\u3048\u308b\u30d1\u30bf\u30fc\u30f3<\/h2>\n\n\n\n<p>PHPUnit\u306e\u57fa\u672c\u3092\u7406\u89e3\u3057\u305f\u3089\u3001\u6b21\u306f\u5b9f\u969b\u306e\u958b\u767a\u73fe\u5834\u3067\u4f7f\u308f\u308c\u3066\u3044\u308b\u5b9f\u8df5\u7684\u306a\u30c6\u30b9\u30c8\u30d1\u30bf\u30fc\u30f3\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u4e3b\u8981\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u306e\u5177\u4f53\u7684\u306a\u5b9f\u88c5\u4f8b\u3084\u3001\u30ec\u30ac\u30b7\u30fc\u30b3\u30fc\u30c9\u3078\u306e\u30c6\u30b9\u30c8\u5c0e\u5165\u30a2\u30d7\u30ed\u30fc\u30c1\u306a\u3069\u3001\u73fe\u5834\u3067\u3059\u3050\u306b\u6d3b\u7528\u3067\u304d\u308b\u30ce\u30a6\u30cf\u30a6\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-26\">Laravel\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306e\u30e2\u30c7\u30eb\u3068\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u30c6\u30b9\u30c8\u4f8b<\/h3>\n\n\n\n<p>Laravel\u3067\u306f\u3001PHPUnit\u304c\u6a19\u6e96\u3067\u7d71\u5408\u3055\u308c\u3066\u304a\u308a\u3001\u8c4a\u5bcc\u306a\u30c6\u30b9\u30c8\u652f\u63f4\u6a5f\u80fd\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-27\">\u30e2\u30c7\u30eb\u306e\u30c6\u30b9\u30c8<\/h4>\n\n\n\n<p>Laravel\u30e2\u30c7\u30eb\u306e\u30c6\u30b9\u30c8\u3067\u306f\u3001\u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u30b7\u30c3\u30d7\u3001\u30b9\u30b3\u30fc\u30d7\u3001\u30df\u30e5\u30fc\u30c6\u30fc\u30bf\u306a\u3069\u306e\u6a5f\u80fd\u3092\u691c\u8a3c\u3057\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\/\/ UserModelTest.php\nnamespace Tests\\Unit;\n\nuse App\\Models\\User;\nuse App\\Models\\Post;\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\nuse Tests\\TestCase;\n\nclass UserModelTest extends TestCase\n{\n    \/\/ \u30c6\u30b9\u30c8\u9593\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30ea\u30bb\u30c3\u30c8\n    use RefreshDatabase;\n    \n    public function testUserHasManyPosts()\n    {\n        \/\/ \u30e6\u30fc\u30b6\u30fc\u3068\u6295\u7a3f\u3092\u4f5c\u6210\n        $user = User::factory()-&gt;create();\n        $post = Post::factory()-&gt;create(['user_id' =&gt; $user-&gt;id]);\n        \n        \/\/ \u30ea\u30ec\u30fc\u30b7\u30e7\u30f3\u30b7\u30c3\u30d7\u304c\u6b63\u3057\u304f\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\n        $this-&gt;assertTrue($user-&gt;posts-&gt;contains($post));\n        $this-&gt;assertEquals(1, $user-&gt;posts-&gt;count());\n    }\n    \n    public function testActiveScope()\n    {\n        \/\/ \u30a2\u30af\u30c6\u30a3\u30d6\u30e6\u30fc\u30b6\u30fc\u3068\u975e\u30a2\u30af\u30c6\u30a3\u30d6\u30e6\u30fc\u30b6\u30fc\u3092\u4f5c\u6210\n        $activeUser = User::factory()-&gt;create(['active' =&gt; true]);\n        $inactiveUser = User::factory()-&gt;create(['active' =&gt; false]);\n        \n        \/\/ active\u30b9\u30b3\u30fc\u30d7\u304c\u6b63\u3057\u304f\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\n        $activeUsers = User::active()-&gt;get();\n        $this-&gt;assertTrue($activeUsers-&gt;contains($activeUser));\n        $this-&gt;assertFalse($activeUsers-&gt;contains($inactiveUser));\n    }\n    \n    public function testFullNameAccessor()\n    {\n        $user = User::factory()-&gt;create([\n            'first_name' =&gt; 'John',\n            'last_name' =&gt; 'Doe'\n        ]);\n        \n        \/\/ \u30a2\u30af\u30bb\u30b5\u304c\u6b63\u3057\u304f\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\n        $this-&gt;assertEquals('John Doe', $user-&gt;full_name);\n    }\n}\n<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-28\">\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u30c6\u30b9\u30c8<\/h4>\n\n\n\n<p>Laravel\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u30c6\u30b9\u30c8\u3067\u306f\u3001HTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u3001\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3001\u30d3\u30e5\u30fc\u5909\u6570\u306a\u3069\u3092\u691c\u8a3c\u3057\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\/\/ PostControllerTest.php\nnamespace Tests\\Feature;\n\nuse App\\Models\\User;\nuse App\\Models\\Post;\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\nuse Tests\\TestCase;\n\nclass PostControllerTest extends TestCase\n{\n    use RefreshDatabase;\n    \n    public function testIndex()\n    {\n        \/\/ \u8907\u6570\u306e\u6295\u7a3f\u3092\u4f5c\u6210\n        $posts = Post::factory()-&gt;count(3)-&gt;create();\n        \n        \/\/ GET\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\n        $response = $this-&gt;get('\/posts');\n        \n        \/\/ \u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u691c\u8a3c\n        $response-&gt;assertStatus(200);\n        $response-&gt;assertViewIs('posts.index');\n        $response-&gt;assertViewHas('posts');\n        \n        \/\/ \u3059\u3079\u3066\u306e\u6295\u7a3f\u304c\u30d3\u30e5\u30fc\u306b\u6e21\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\n        $viewPosts = $response-&gt;viewData('posts');\n        $this-&gt;assertEquals($posts-&gt;count(), $viewPosts-&gt;count());\n    }\n    \n    public function testStore()\n    {\n        \/\/ \u30e6\u30fc\u30b6\u30fc\u3092\u8a8d\u8a3c\u72b6\u614b\u306b\u3059\u308b\n        $user = User::factory()-&gt;create();\n        $this-&gt;actingAs($user);\n        \n        \/\/ \u65b0\u3057\u3044\u6295\u7a3f\u30c7\u30fc\u30bf\n        $postData = [\n            'title' =&gt; 'Test Post',\n            'content' =&gt; 'This is a test post content.'\n        ];\n        \n        \/\/ POST\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\n        $response = $this-&gt;post('\/posts', $postData);\n        \n        \/\/ \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u4fdd\u5b58\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\n        $this-&gt;assertDatabaseHas('posts', [\n            'title' =&gt; 'Test Post',\n            'user_id' =&gt; $user-&gt;id\n        ]);\n        \n        \/\/ \u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u306e\u78ba\u8a8d\n        $response-&gt;assertRedirect('\/posts');\n        $response-&gt;assertSessionHas('success');\n    }\n}\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-29\">Symfony\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306e\u30b5\u30fc\u30d3\u30b9\u30af\u30e9\u30b9\u30c6\u30b9\u30c8\u5b9f\u88c5<\/h3>\n\n\n\n<p>Symfony\u3067\u306f\u3001\u30b5\u30fc\u30d3\u30b9\u30b3\u30f3\u30c6\u30ca\u3092\u6d3b\u7528\u3057\u305f\u30c6\u30b9\u30c8\u304c\u4e00\u822c\u7684\u3067\u3059\u3002\u4ee5\u4e0b\u306f\u30b5\u30fc\u30d3\u30b9\u30af\u30e9\u30b9\u306e\u30c6\u30b9\u30c8\u4f8b\u3067\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\/\/ src\/Tests\/Service\/NewsletterServiceTest.php\nnamespace App\\Tests\\Service;\n\nuse App\\Entity\\User;\nuse App\\Repository\\UserRepository;\nuse App\\Service\\EmailService;\nuse App\\Service\\NewsletterService;\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase;\n\nclass NewsletterServiceTest extends KernelTestCase\n{\n    public function testSendNewsletter()\n    {\n        self::bootKernel();\n        $container = static::getContainer();\n        \n        \/\/ \u30e2\u30c3\u30af\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210\n        $userRepository = $this-&gt;createMock(UserRepository::class);\n        $userRepository-&gt;expects($this-&gt;once())\n                       -&gt;method('findSubscribedUsers')\n                       -&gt;willReturn([\n                           (new User())-&gt;setEmail('user1@example.com'),\n                           (new User())-&gt;setEmail('user2@example.com')\n                       ]);\n        \n        \/\/ \u30e2\u30c3\u30af\u30e1\u30fc\u30eb\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\n        $emailService = $this-&gt;createMock(EmailService::class);\n        $emailService-&gt;expects($this-&gt;exactly(2))\n                    -&gt;method('sendEmail');\n        \n        \/\/ \u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u30e2\u30c3\u30af\u3092\u6ce8\u5165\n        $newsletterService = new NewsletterService($userRepository, $emailService);\n        \n        \/\/ \u30cb\u30e5\u30fc\u30b9\u30ec\u30bf\u30fc\u9001\u4fe1\u3092\u30c6\u30b9\u30c8\n        $result = $newsletterService-&gt;sendNewsletter('New Features', 'Check out our latest features!');\n        \n        $this-&gt;assertEquals(2, $result['sent']);\n        $this-&gt;assertEquals(0, $result['failed']);\n    }\n}\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-30\">\u30ec\u30ac\u30b7\u30fc\u30b3\u30fc\u30c9\u3078\u306e\u30c6\u30b9\u30c8\u5c0e\u5165\u30a2\u30d7\u30ed\u30fc\u30c1<\/h3>\n\n\n\n<p>\u30c6\u30b9\u30c8\u304c\u306a\u3044\u30ec\u30ac\u30b7\u30fc\u30b3\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u30c6\u30b9\u30c8\u3092\u5c0e\u5165\u3059\u308b\u5834\u5408\u3001\u6bb5\u968e\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u304c\u52b9\u679c\u7684\u3067\u3059\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u7279\u6027\u30c6\u30b9\u30c8\uff08Characterization Tests\uff09<\/strong>: \u307e\u305a\u73fe\u5728\u306e\u52d5\u4f5c\u3092\u628a\u63e1\u3059\u308b\u305f\u3081\u306e\u30c6\u30b9\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u300c\u52d5\u4f5c\u3092\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u5316\u3059\u308b\u30c6\u30b9\u30c8\u300d\u3067\u3001\u73fe\u5728\u306e\u51fa\u529b\u304c\u6b63\u3057\u3044\u304b\u3069\u3046\u304b\u306f\u8003\u616e\u3057\u307e\u305b\u3093\u3002<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u65e2\u5b58\u306e\u8a08\u7b97\u30ed\u30b8\u30c3\u30af\u306e\u52d5\u4f5c\u3092\u628a\u63e1\u3059\u308b\u30c6\u30b9\u30c8\npublic function testLegacyCalculationLogic()\n{\n    $calculator = new LegacyCalculator();\n    \n    \/\/ \u73fe\u5728\u306e\u52d5\u4f5c\u3092\u8a18\u9332\u3059\u308b\u30c6\u30b9\u30c8\n    $this-&gt;assertEquals(150, $calculator-&gt;calculateTotal(100, 0.5, 0));\n    $this-&gt;assertEquals(212, $calculator-&gt;calculateTotal(200, 0.1, 2));\n    \/\/ \u30a8\u30c3\u30b8\u30b1\u30fc\u30b9\u3082\u8a18\u9332\n    $this-&gt;assertEquals(0, $calculator-&gt;calculateTotal(0, 0.5, 0));\n    $this-&gt;assertEquals(105, $calculator-&gt;calculateTotal(-100, 0.5, 0));\n}\n<\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>\u5b89\u5168\u5730\u5e2f\u306e\u78ba\u4fdd<\/strong>: \u30c6\u30b9\u30c8\u3067\u4fdd\u8b77\u3055\u308c\u305f\u30b3\u30fc\u30c9\u304b\u3089\u5f90\u3005\u306b\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u3092\u884c\u3044\u307e\u3059\uff1a<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u5f8c\u306e\u30b3\u30fc\u30c9\u3092\u30c6\u30b9\u30c8\npublic function testRefactoredCalculationLogic()\n{\n    $legacyCalculator = new LegacyCalculator();\n    $newCalculator = new ImprovedCalculator();\n    \n    \/\/ \u69d8\u3005\u306a\u5165\u529b\u306b\u5bfe\u3057\u3066\u540c\u3058\u7d50\u679c\u304c\u5f97\u3089\u308c\u308b\u3053\u3068\u3092\u78ba\u8a8d\n    $testCases = [\n        [100, 0.5, 0],\n        [200, 0.1, 2],\n        [0, 0.5, 0],\n        [-100, 0.5, 0]\n    ];\n    \n    foreach ($testCases as $case) {\n        $legacyResult = $legacyCalculator-&gt;calculateTotal(...$case);\n        $newResult = $newCalculator-&gt;calculateTotal(...$case);\n        $this-&gt;assertEquals($legacyResult, $newResult);\n    }\n}\n<\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>\u30af\u30e9\u30b9\u62bd\u51fa\u3068\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u5c0e\u5165<\/strong>: \u30ec\u30ac\u30b7\u30fc\u30b3\u30fc\u30c9\u3092\u5c11\u3057\u305a\u3064\u5206\u89e3\u3057\u3001\u30c6\u30b9\u30c8\u53ef\u80fd\u306a\u69cb\u9020\u306b\u6539\u5584\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u30ec\u30ac\u30b7\u30fc\u30b3\u30fc\u30c9\u3078\u306e\u30c6\u30b9\u30c8\u5c0e\u5165\u306f\u4e00\u671d\u4e00\u5915\u306b\u306f\u3044\u304d\u307e\u305b\u3093\u304c\u3001\u7740\u5b9f\u306b\u9032\u3081\u308b\u3053\u3068\u3067\u6280\u8853\u7684\u8ca0\u50b5\u3092\u6e1b\u3089\u3057\u3001\u30b3\u30fc\u30c9\u306e\u54c1\u8cea\u5411\u4e0a\u306b\u3064\u306a\u304c\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u5b9f\u8df5\u7684\u306a\u4f8b\u306f\u3001\u69d8\u3005\u306a\u30b7\u30ca\u30ea\u30aa\u3067PHPUnit\u3092\u52b9\u679c\u7684\u306b\u6d3b\u7528\u3059\u308b\u305f\u3081\u306e\u57fa\u76e4\u3068\u306a\u308a\u307e\u3059\u3002\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u7279\u6027\u3092\u7406\u89e3\u3057\u3001\u72b6\u6cc1\u306b\u5fdc\u3058\u305f\u9069\u5207\u306a\u30c6\u30b9\u30c8\u6226\u7565\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u3067\u3001\u5805\u7262\u306a\u30c6\u30b9\u30c8\u30b9\u30a4\u30fc\u30c8\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-31\">CI\/CD\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3078\u306ePHPUnit\u7d71\u5408\u30ac\u30a4\u30c9<\/h2>\n\n\n\n<p>PHPUnit\u3092CI\/CD\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306b\u7d71\u5408\u3059\u308b\u3053\u3068\u3067\u3001\u30b3\u30fc\u30c9\u306e\u54c1\u8cea\u3092\u7d99\u7d9a\u7684\u306b\u76e3\u8996\u3057\u3001\u554f\u984c\u3092\u65e9\u671f\u306b\u767a\u898b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u4e3b\u8981\u306aCI\/CD\u30c4\u30fc\u30eb\u3067\u306ePHPUnit\u7d71\u5408\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-32\">GitHubActions\u3067PHPUnit\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u3059\u308b\u8a2d\u5b9a\u4f8b<\/h3>\n\n\n\n<p>GitHub Actions\u306f\u3001GitHub\u306b\u7d71\u5408\u3055\u308c\u305fCI\/CD\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3042\u308a\u3001PHPUnit\u30c6\u30b9\u30c8\u3092\u7c21\u5358\u306b\u81ea\u52d5\u5316\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u57fa\u672c\u7684\u306a\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u4f8b\u3067\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># .github\/workflows\/tests.yml\nname: PHP Tests\n\non:\n  push:\n    branches: [ main, develop ]\n  pull_request:\n    branches: [ main, develop ]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    \n    # \u8907\u6570\u306ePHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\n    strategy:\n      matrix:\n        php-versions: ['8.0', '8.1', '8.2']\n    \n    steps:\n    - uses: actions\/checkout@v3\n    \n    # PHP\u74b0\u5883\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\n    - name: Setup PHP\n      uses: shivammathur\/setup-php@v2\n      with:\n        php-version: ${{ matrix.php-versions }}\n        extensions: mbstring, intl, pdo_mysql\n        coverage: xdebug\n    \n    # Composer\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u8a2d\u5b9a\n    - name: Cache Composer packages\n      uses: actions\/cache@v3\n      with:\n        path: vendor\n        key: ${{ runner.os }}-php-${{ hashFiles('**\/composer.lock') }}\n        restore-keys: |\n          ${{ runner.os }}-php-\n    \n    # \u4f9d\u5b58\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\n    - name: Install dependencies\n      run: composer install --prefer-dist --no-progress\n    \n    # PHPUnit\u3067\u30c6\u30b9\u30c8\u5b9f\u884c\n    - name: Run tests\n      run: vendor\/bin\/phpunit --coverage-clover=coverage.xml\n    \n    # \u30b3\u30fc\u30c9\u30ab\u30d0\u30ec\u30c3\u30b8\u306e\u9001\u4fe1\uff08\u4f8b\uff1aCodecov\uff09\n    - name: Upload coverage to Codecov\n      uses: codecov\/codecov-action@v3\n      with:\n        file: .\/coverage.xml\n        fail_ci_if_error: true\n<\/pre>\n\n\n\n<p>\u3053\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u3001\u30d7\u30c3\u30b7\u30e5\u3084\u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8\u6642\u306b\u81ea\u52d5\u7684\u306b\u8907\u6570\u306ePHP\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u30c6\u30b9\u30c8\u304c\u5b9f\u884c\u3055\u308c\u3001\u30b3\u30fc\u30c9\u30ab\u30d0\u30ec\u30c3\u30b8\u60c5\u5831\u304c\u53ce\u96c6\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-33\">Jenkins\u3067\u306ePHPUnit\u30c6\u30b9\u30c8\u5b9f\u884c\u3068\u30ec\u30dd\u30fc\u30c8\u751f\u6210\u306e\u65b9\u6cd5<\/h3>\n\n\n\n<p>Jenkins\u3092\u4f7f\u7528\u3057\u305fPHPUnit\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3067\u306f\u3001Jenkinsfile\u3092\u4f7f\u7528\u3057\u3066\u8a2d\u5b9a\u3067\u304d\u307e\u3059\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ Jenkinsfile\npipeline {\n    agent any\n    \n    stages {\n        stage('Prepare') {\n            steps {\n                sh 'composer install --no-interaction --no-progress'\n            }\n        }\n        \n        stage('Test') {\n            steps {\n                sh 'vendor\/bin\/phpunit --log-junit test-reports\/junit.xml --coverage-html test-reports\/coverage'\n            }\n            post {\n                always {\n                    \/\/ JUnit\u30c6\u30b9\u30c8\u30ec\u30dd\u30fc\u30c8\u306e\u516c\u958b\n                    junit 'test-reports\/junit.xml'\n                    \n                    \/\/ \u30b3\u30fc\u30c9\u30ab\u30d0\u30ec\u30c3\u30b8\u30ec\u30dd\u30fc\u30c8\u306e\u516c\u958b\n                    publishHTML(target: [\n                        allowMissing: false,\n                        alwaysLinkToLastBuild: true,\n                        keepAll: true,\n                        reportDir: 'test-reports\/coverage',\n                        reportFiles: 'index.html',\n                        reportName: 'Coverage Report'\n                    ])\n                }\n            }\n        }\n        \n        stage('Deploy') {\n            when {\n                expression { currentBuild.resultIsBetterOrEqualTo('SUCCESS') }\n            }\n            steps {\n                echo 'Deployment steps would go here'\n            }\n        }\n    }\n    \n    post {\n        failure {\n            \/\/ \u30c6\u30b9\u30c8\u5931\u6557\u6642\u306e\u901a\u77e5\n            emailext (\n                subject: \"Build Failed: ${env.JOB_NAME} #${env.BUILD_NUMBER}\",\n                body: \"Check the build logs at ${env.BUILD_URL}\",\n                to: 'team@example.com'\n            )\n            \n            \/\/ Slack\u901a\u77e5\u306e\u4f8b\n            slackSend channel: '#alerts', color: 'danger', message: \"\u30c6\u30b9\u30c8\u5931\u6557: ${env.JOB_NAME} #${env.BUILD_NUMBER}\"\n        }\n    }\n}\n<\/pre>\n\n\n\n<p>\u3053\u306eJenkinsfile\u3067\u306f\u3001\u30c6\u30b9\u30c8\u5b9f\u884c\u3001\u7d50\u679c\u30ec\u30dd\u30fc\u30c8\u306e\u751f\u6210\u3001\u30c6\u30b9\u30c8\u5931\u6557\u6642\u306e\u901a\u77e5\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-34\">\u30c6\u30b9\u30c8\u5931\u6557\u6642\u306e\u30a2\u30e9\u30fc\u30c8\u3068\u5bfe\u5fdc\u30d5\u30ed\u30fc\u306e\u69cb\u7bc9<\/h3>\n\n\n\n<p>\u30c6\u30b9\u30c8\u5931\u6557\u6642\u306e\u30a2\u30e9\u30fc\u30c8\u3068\u5bfe\u5fdc\u30d5\u30ed\u30fc\u306f\u3001\u52b9\u7387\u7684\u306aCI\/CD\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u306e\u91cd\u8981\u306a\u8981\u7d20\u3067\u3059\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u901a\u77e5\u30b7\u30b9\u30c6\u30e0\u306e\u69cb\u7bc9<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Slack\/Teams\/Discord\u3078\u306e\u901a\u77e5<\/li>\n\n\n\n<li>\u30e1\u30fc\u30eb\u901a\u77e5\uff08\u62c5\u5f53\u8005\u307e\u305f\u306f\u30c1\u30fc\u30e0\u5168\u4f53\u3078\uff09<\/li>\n\n\n\n<li>\u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8\u3078\u306e\u30b3\u30e1\u30f3\u30c8\u81ea\u52d5\u6295\u7a3f<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u30a2\u30e9\u30fc\u30c8\u60c5\u5831\u306e\u5145\u5b9f<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\u5931\u6557\u3057\u305f\u30c6\u30b9\u30c8\u306e\u8a73\u7d30\u60c5\u5831<\/li>\n\n\n\n<li>\u95a2\u9023\u3059\u308b\u30b3\u30df\u30c3\u30c8\u60c5\u5831\u3068\u30b3\u30df\u30c3\u30bf\u30fc<\/li>\n\n\n\n<li>\u30c6\u30b9\u30c8\u5931\u6557\u306e\u5f71\u97ff\u7bc4\u56f2<\/li>\n\n\n\n<li>\u554f\u984c\u89e3\u6c7a\u306e\u305f\u3081\u306e\u63a8\u5968\u30a2\u30af\u30b7\u30e7\u30f3<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5bfe\u5fdc\u30d5\u30ed\u30fc\u306e\u81ea\u52d5\u5316<\/strong>:\n<ul class=\"wp-block-list\">\n<li>\u30c6\u30b9\u30c8\u5931\u6557\u306e\u30c1\u30b1\u30c3\u30c8\u81ea\u52d5\u4f5c\u6210\uff08Jira\u3001GitHub\u306a\u3069\uff09<\/li>\n\n\n\n<li>\u7279\u5b9a\u306e\u30c6\u30b9\u30c8\u5931\u6557\u30d1\u30bf\u30fc\u30f3\u306b\u57fa\u3065\u304f\u81ea\u52d5\u5bfe\u5fdc<\/li>\n\n\n\n<li>\u7dca\u6025\u5ea6\u306b\u5fdc\u3058\u305f\u901a\u77e5\u30ec\u30d9\u30eb\u306e\u8abf\u6574<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001GitHubActions\u3067\u306eSlack\u901a\u77e5\u306e\u8a2d\u5b9a\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">- name: Slack Notification on Failure\n  uses: 8398a7\/action-slack@v3\n  if: failure()\n  with:\n    status: ${{ job.status }}\n    fields: repo,message,commit,author,action,workflow,job\n  env:\n    SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}\n<\/pre>\n\n\n\n<p>CI\/CD\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3078\u306ePHPUnit\u7d71\u5408\u306b\u3088\u308a\u3001\u958b\u767a\u30c1\u30fc\u30e0\u306f\u8fc5\u901f\u304b\u3064\u5b89\u5168\u306b\u30b3\u30fc\u30c9\u3092\u63d0\u4f9b\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u81ea\u52d5\u30c6\u30b9\u30c8\u3092\u901a\u3058\u305f\u65e9\u671f\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u30eb\u30fc\u30d7\u306f\u3001\u30d0\u30b0\u306e\u65e9\u671f\u767a\u898b\u3068\u4fee\u6b63\u3092\u4fc3\u9032\u3057\u3001\u5168\u4f53\u7684\u306a\u30b3\u30fc\u30c9\u54c1\u8cea\u306e\u5411\u4e0a\u306b\u8ca2\u732e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-35\">PHPUnit\u30c6\u30b9\u30c8\u6587\u5316\u3092\u30c1\u30fc\u30e0\u306b\u6839\u4ed8\u304b\u305b\u308b\u305f\u3081\u306e\u30b9\u30c6\u30c3\u30d7<\/h2>\n\n\n\n<p>\u6280\u8853\u7684\u306a\u5074\u9762\u3060\u3051\u3067\u306a\u304f\u3001\u30c1\u30fc\u30e0\u5168\u4f53\u306b\u30c6\u30b9\u30c8\u6587\u5316\u3092\u6d78\u900f\u3055\u305b\u308b\u3053\u3068\u3082PHPUnit\u3092\u52b9\u679c\u7684\u306b\u6d3b\u7528\u3059\u308b\u305f\u3081\u306e\u91cd\u8981\u306a\u8981\u7d20\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u3001PHPUnit\u30c6\u30b9\u30c8\u6587\u5316\u3092\u30c1\u30fc\u30e0\u306b\u6839\u4ed8\u304b\u305b\u308b\u305f\u3081\u306e\u5b9f\u8df5\u7684\u306a\u30b9\u30c6\u30c3\u30d7\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-36\">\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3067\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306e\u54c1\u8cea\u3092\u9ad8\u3081\u308b\u65b9\u6cd5<\/h3>\n\n\n\n<p>\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u306f\u3001\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306e\u54c1\u8cea\u5411\u4e0a\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306e\u5171\u6709\u306b\u6700\u9069\u306a\u6a5f\u4f1a\u3067\u3059\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u30c6\u30b9\u30c8\u30ec\u30d3\u30e5\u30fc\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8\u306e\u4f5c\u6210<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u30c6\u30b9\u30c8\u306e\u547d\u540d\u898f\u5247\u306f\u660e\u78ba\u304b<\/li>\n\n\n\n<li>\u30c6\u30b9\u30c8\u306f\u72ec\u7acb\u3057\u3066\u5b9f\u884c\u53ef\u80fd\u304b\uff08\u4ed6\u306e\u30c6\u30b9\u30c8\u306b\u4f9d\u5b58\u3057\u3066\u3044\u306a\u3044\u304b\uff09<\/li>\n\n\n\n<li>\u30a2\u30b5\u30fc\u30b7\u30e7\u30f3\u306f\u5177\u4f53\u7684\u3067\u660e\u78ba\u304b<\/li>\n\n\n\n<li>\u904e\u5270\u306a\u30e2\u30c3\u30af\u5316\u3092\u907f\u3051\u3066\u3044\u308b\u304b<\/li>\n\n\n\n<li>\u30ab\u30d0\u30ec\u30c3\u30b8\u306f\u9069\u5207\u304b\uff08\u6761\u4ef6\u5206\u5c90\u3092\u3059\u3079\u3066\u30ab\u30d0\u30fc\u3057\u3066\u3044\u308b\u304b\uff09<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u30ec\u30d3\u30e5\u30fc\u6587\u5316\u306e\u78ba\u7acb<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u300c\u30c6\u30b9\u30c8\u306a\u3057\u3067\u306f\u6a5f\u80fd\u306f\u5b8c\u6210\u3068\u307f\u306a\u3055\u306a\u3044\u300d\u3068\u3044\u3046\u57fa\u6e96\u3092\u8a2d\u3051\u308b<\/li>\n\n\n\n<li>\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u306e\u5909\u66f4\u306b\u306f\u5fc5\u305a\u30c6\u30b9\u30c8\u306e\u8ffd\u52a0\u307e\u305f\u306f\u66f4\u65b0\u3092\u6c42\u3081\u308b<\/li>\n\n\n\n<li>\u826f\u3044\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306e\u4f8b\u3092\u5171\u6709\u3057\u3001\u79f0\u8cdb\u3059\u308b<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>\u5177\u4f53\u7684\u306a\u30ec\u30d3\u30e5\u30fc\u30b3\u30e1\u30f3\u30c8\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\u300c\u3053\u306eController\u30c6\u30b9\u30c8\u3067\u306f\u3001\u8a8d\u8a3c\u5931\u6557\u306e\u30b1\u30fc\u30b9\u3082\u30c6\u30b9\u30c8\u3059\u308b\u3068\u3088\u3044\u3067\u3057\u3087\u3046\u300d\n\u300c\u3053\u306e\u30c6\u30b9\u30c8\u3067\u306f\u30e2\u30c3\u30af\u306e\u8a2d\u5b9a\u304c\u8907\u96d1\u3059\u304e\u307e\u3059\u3002\u30c6\u30b9\u30c8\u5bfe\u8c61\u3092\u5c0f\u3055\u304f\u3059\u308b\u3053\u3068\u3092\u691c\u8a0e\u3057\u307e\u305b\u3093\u304b\uff1f\u300d\n\u300c\u3053\u306e\u6761\u4ef6\u5206\u5c90\u306efalse\u30b1\u30fc\u30b9\u3082\u30c6\u30b9\u30c8\u306b\u542b\u3081\u308b\u3068\u3001\u30ab\u30d0\u30ec\u30c3\u30b8\u304c\u5411\u4e0a\u3057\u307e\u3059\u300d\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-37\">\u30da\u30a2\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u3088\u308b\u30c6\u30b9\u30c8\u4f5c\u6210\u30b9\u30ad\u30eb\u306e\u5171\u6709<\/h3>\n\n\n\n<p>\u30da\u30a2\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306f\u3001\u30c6\u30b9\u30c8\u30b9\u30ad\u30eb\u3092\u52b9\u679c\u7684\u306b\u5171\u6709\u3059\u308b\u5f37\u529b\u306a\u624b\u6cd5\u3067\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7d4c\u9a13\u8005\u3068\u672a\u7d4c\u9a13\u8005\u306e\u30da\u30a2\u30ea\u30f3\u30b0<\/strong>: \u30c6\u30b9\u30c8\u7d4c\u9a13\u304c\u8c4a\u5bcc\u306a\u30e1\u30f3\u30d0\u30fc\u3068\u7d4c\u9a13\u306e\u5c11\u306a\u3044\u30e1\u30f3\u30d0\u30fc\u3092\u30da\u30a2\u306b\u3059\u308b<\/li>\n\n\n\n<li><strong>\u30ed\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3<\/strong>: \u5b9a\u671f\u7684\u306b\u30da\u30a2\u3092\u5909\u66f4\u3057\u3001\u30c1\u30fc\u30e0\u5168\u4f53\u3067\u30c6\u30b9\u30c8\u77e5\u8b58\u3092\u5747\u7b49\u306b\u5e83\u3052\u308b<\/li>\n\n\n\n<li><strong>\u30c6\u30b9\u30c8\u30d5\u30a1\u30fc\u30b9\u30c8\u30fb\u30bb\u30c3\u30b7\u30e7\u30f3<\/strong>: \u300c\u30c6\u30b9\u30c8\u304b\u3089\u66f8\u304f\u300d\u3053\u3068\u306b\u7279\u5316\u3057\u305f\u30da\u30a2\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u5b9f\u65bd<\/li>\n<\/ul>\n\n\n\n<p>\u30da\u30a2\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u52b9\u679c\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6697\u9ed9\u77e5\u306e\u5171\u6709\uff08\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3001\u30c4\u30fc\u30eb\u306e\u4f7f\u3044\u65b9\u306a\u3069\uff09<\/li>\n\n\n\n<li>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af<\/li>\n\n\n\n<li>\u30c6\u30b9\u30c8\u306b\u5bfe\u3059\u308b\u5fc3\u7406\u7684\u969c\u58c1\u306e\u4f4e\u6e1b<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-38\">\u30c6\u30b9\u30c8\u99c6\u52d5\u306e\u958b\u767a\u30b5\u30a4\u30af\u30eb\u3092\u30c1\u30fc\u30e0\u306b\u5b9a\u7740\u3055\u305b\u308b\u30b3\u30c4<\/h3>\n\n\n\n<p>\u30c6\u30b9\u30c8\u99c6\u52d5\u958b\u767a\uff08TDD\uff09\u3092\u30c1\u30fc\u30e0\u306b\u5b9a\u7740\u3055\u305b\u308b\u306b\u306f\u3001\u6bb5\u968e\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u304c\u52b9\u679c\u7684\u3067\u3059\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u5c0f\u3055\u304f\u59cb\u3081\u308b<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u65b0\u898f\u6a5f\u80fd\u3084\u5c0f\u3055\u306a\u30d0\u30b0\u4fee\u6b63\u304b\u3089TDD\u3092\u9069\u7528<\/li>\n\n\n\n<li>\u5168\u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u3067\u306a\u304f\u3001\u7279\u5b9a\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3084\u30b5\u30fc\u30d3\u30b9\u306b\u9650\u5b9a\u3057\u3066\u5c0e\u5165<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5171\u540c\u5b66\u7fd2\u306e\u4fc3\u9032<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u90311\u56de\u306e\u300c\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0Dojo\u300d: \u30c1\u30fc\u30e0\u5168\u54e1\u3067\u540c\u3058\u8ab2\u984c\u3092TDD\u3067\u89e3\u304f<\/li>\n\n\n\n<li>\u300c\u30e2\u30d6\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u300d: \u30c1\u30fc\u30e0\u5168\u54e1\u3067\u4e00\u3064\u306e\u554f\u984c\u3092TDD\u3067\u89e3\u6c7a<\/li>\n\n\n\n<li>\u300c\u30ab\u30bf\u300d\u7df4\u7fd2: \u5b9a\u578b\u7684\u306a\u554f\u984c\u3092TDD\u3067\u7e70\u308a\u8fd4\u3057\u89e3\u304f<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u53ef\u8996\u5316\u3068\u795d\u798f<\/strong>\n<ul class=\"wp-block-list\">\n<li>\u30c6\u30b9\u30c8\u30ab\u30d0\u30ec\u30c3\u30b8\u3084\u30c6\u30b9\u30c8\u6570\u306e\u5897\u52a0\u3092\u8996\u899a\u5316\u3057\u3066\u5171\u6709<\/li>\n\n\n\n<li>TDD\u306e\u6210\u529f\u4e8b\u4f8b\uff08\u30d0\u30b0\u306e\u65e9\u671f\u767a\u898b\u3001\u5b89\u5168\u306a\u30ea\u30d5\u30a1\u30af\u30bf\u30ea\u30f3\u30b0\u306a\u3069\uff09\u3092\u5171\u6709<\/li>\n\n\n\n<li>\u300c\u30c6\u30b9\u30c8\u306e\u52c7\u8005\u300d\u306a\u3069\u3001\u30c6\u30b9\u30c8\u6587\u5316\u63a8\u9032\u306b\u8ca2\u732e\u3057\u305f\u30e1\u30f3\u30d0\u30fc\u3092\u79f0\u3048\u308b<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5b9f\u8df5\u7684\u306a\u30ef\u30fc\u30af\u30b7\u30e7\u30c3\u30d7<\/strong>\n<ul class=\"wp-block-list\">\n<li>PHPUnit\u306e\u57fa\u672c\u304b\u3089\u5fdc\u7528\u307e\u3067\u3092\u5b66\u3076\u30cf\u30f3\u30ba\u30aa\u30f3\u30bb\u30c3\u30b7\u30e7\u30f3<\/li>\n\n\n\n<li>\u30ec\u30ac\u30b7\u30fc\u30b3\u30fc\u30c9\u3078\u306e\u30c6\u30b9\u30c8\u5c0e\u5165\u30ef\u30fc\u30af\u30b7\u30e7\u30c3\u30d7<\/li>\n\n\n\n<li>\u300c\u30c6\u30b9\u30c8\u3057\u3084\u3059\u3044\u8a2d\u8a08\u300d\u306b\u3064\u3044\u3066\u306e\u52c9\u5f37\u4f1a<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>\u30c6\u30b9\u30c8\u6587\u5316\u306f\u4e00\u671d\u4e00\u5915\u306b\u306f\u6839\u4ed8\u304d\u307e\u305b\u3093\u304c\u3001\u5c0f\u3055\u306a\u6210\u529f\u4f53\u9a13\u3092\u7a4d\u307f\u91cd\u306d\u3001\u30c1\u30fc\u30e0\u5168\u4f53\u3067\u4fa1\u5024\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u3067\u3001\u5f90\u3005\u306b\u300c\u30c6\u30b9\u30c8\u306f\u30b3\u30fc\u30c9\u306e\u4e00\u90e8\u300d\u3068\u3044\u3046\u8a8d\u8b58\u3092\u6d78\u900f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u6700\u7d42\u7684\u306b\u306f\u3001\u30c6\u30b9\u30c8\u3092\u66f8\u304f\u3053\u3068\u304c\u7279\u5225\u306a\u30bf\u30b9\u30af\u3067\u306f\u306a\u304f\u3001\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u81ea\u7136\u306a\u4e00\u90e8\u3068\u306a\u308a\u3001\u30c1\u30fc\u30e0\u306e\u751f\u7523\u6027\u3068\u54c1\u8cea\u304c\u5927\u304d\u304f\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Warning: Undefined array key &#8220;is_admin&#8221; in \/home\/xs392991\/dexall.co.jp\/public_html\/articles\/wp-content\/themes\/ &#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,63],"tags":[],"class_list":{"0":"post-3452","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-php","7":"category-php-syntax","8":"nothumb"},"_links":{"self":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts\/3452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3452"}],"version-history":[{"count":2,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts\/3452\/revisions"}],"predecessor-version":[{"id":3454,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts\/3452\/revisions\/3454"}],"wp:attachment":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}