{"version":"1.0","provider_name":"blog website","provider_url":"https:\/\/www.etemkeskin.com","author_name":"etemkeskin","author_url":"https:\/\/www.etemkeskin.com\/index.php\/author\/etemkeskinyahoo-com\/","title":"PHP Laravel' de Unit Test Yazma - blog website","type":"rich","width":600,"height":338,"html":"<blockquote class=\"wp-embedded-content\"><a href=\"https:\/\/www.etemkeskin.com\/index.php\/tr\/2022\/05\/23\/php-laravel-de-unit-test-yazma\/\">PHP Laravel&#8217; de Unit Test Yazma<\/a><\/blockquote>\n<script type='text\/javascript'>\n<!--\/\/--><![CDATA[\/\/><!--\n\t\t\/*! This file is auto-generated *\/\n\t\t!function(d,l){\"use strict\";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!\/[^a-zA-Z0-9]\/.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret=\"'+t.secret+'\"]'),n=l.querySelectorAll('blockquote[data-secret=\"'+t.secret+'\"]'),o=new RegExp(\"^https?:$\",\"i\"),c=0;c<n.length;c++)n[c].style.display=\"none\";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute(\"style\"),\"height\"===t.message){if(1e3<(a=parseInt(t.value,10)))a=1e3;else if(~~a<200)a=200;r.height=a}if(\"link\"===t.message)if(i=l.createElement(\"a\"),a=l.createElement(\"a\"),i.href=r.getAttribute(\"src\"),a.href=t.value,o.test(a.protocol))if(a.host===i.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener(\"message\",d.wp.receiveEmbedMessage,!1),l.addEventListener(\"DOMContentLoaded\",t,!1),d.addEventListener(\"load\",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf(\"MSIE 10\"),i=!!navigator.userAgent.match(\/Trident.*rv:11\\.\/),a=l.querySelectorAll(\"iframe.wp-embedded-content\"),s=0;s<a.length;s++){if(!(e=a[s]).getAttribute(\"data-secret\"))t=Math.random().toString(36).substr(2,10),e.src+=\"#?secret=\"+t,e.setAttribute(\"data-secret\",t);if(r||i)(t=e.cloneNode(!0)).removeAttribute(\"security\"),e.parentNode.replaceChild(t,e)}}}}(window,document);\n\/\/--><!]]>\n<\/script><iframe sandbox=\"allow-scripts\" security=\"restricted\" src=\"https:\/\/www.etemkeskin.com\/index.php\/tr\/2022\/05\/23\/php-laravel-de-unit-test-yazma\/embed\/\" width=\"600\" height=\"338\" title=\"&#8220;PHP Laravel&#8217; de Unit Test Yazma&#8221; &#8212; blog website\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" class=\"wp-embedded-content\"><\/iframe>","description":"Bir yaz\u0131l\u0131m projesinde geli\u015ftirdi\u011fimiz kodlar\u0131n en az hata ile canl\u0131 ortama \u00e7\u0131kmas\u0131n\u0131 istiyorsak, unit testinin yaz\u0131l\u0131p test edilmesi bizim i\u00e7in \u00f6nemlidir. \u00d6zellikle b\u00fcy\u00fck ve kurumsal firmalarda \u00e7al\u0131\u015facaksak yazd\u0131\u011f\u0131m\u0131z kodun testinin yap\u0131lmas\u0131 istenir.Bu yaz\u0131da PHP Laravel' de unit testin nas\u0131l yaz\u0131laca\u011f\u0131n\u0131 ve yaz\u0131lan testin nas\u0131l \u00e7al\u0131\u015ft\u0131r\u0131laca\u011f\u0131n\u0131 anlataca\u011f\u0131m. Test yazmak ilk ba\u015flarda korkutucu ve zaman kayb\u0131 gibi gelebilir. Fakat test yazmaya al\u0131\u015ft\u0131k\u00e7a ve pratik yapt\u0131k\u00e7a el al\u0131\u015fkanl\u0131\u011f\u0131m\u0131z geli\u015fecektir.Laravel, unit testlerini \u00e7al\u0131\u015ft\u0131raca\u011f\u0131m\u0131z PHPUnit paketi ile birlikte gelir. PHPUnit PHP\u2019nin unit test framework\u00fcd\u00fcr. \u0130lk \u00f6nce Laravel' de test kodlar\u0131 nereye yaz\u0131l\u0131r ve nerede bulunur ona bakal\u0131m. Laravel ' de yazaca\u011f\u0131m\u0131z testler tests klas\u00f6r\u00fcn\u00fcn i\u00e7inde bulunur.","thumbnail_url":"https:\/\/www.etemkeskin.com\/wp-content\/uploads\/2022\/05\/image-1.png"}