{"id":801,"date":"2017-03-28T10:06:55","date_gmt":"2017-03-28T09:06:55","guid":{"rendered":"https:\/\/2017.torino.wordcamp.org\/?post_type=wcb_session&#038;p=801"},"modified":"2017-04-14T08:13:29","modified_gmt":"2017-04-14T07:13:29","slug":"writing-testable-code-in-wordpress","status":"publish","type":"wcb_session","link":"https:\/\/torino.wordcamp.org\/2017\/session\/writing-testable-code-in-wordpress\/","title":{"rendered":"Writing testable code in WordPress (EN)"},"content":{"rendered":"<p>If \u201cWordPress is not testable\u201d then why bother about testable code at all?<br \/>\nBecause writing testable code is the first step to testing your code, testing your code is the first step to testing ALL your code, testing all your code is the first step to reduce shipping times, reducing shipping times is the first step to fast response to feature requests and bugs that makes clients happy.<br \/>\nAnd because the first sentence is less true every day.<br \/>\nLet\u2019s find a definition of &#8220;testable code&#8221; that applies to both WordPress and the current practices of testing; let\u2019s see how we can stop ignoring the elephant in the room and embrace testing with a sane approach that improves code and coders quality without leaving anyone out in the cold.<br \/>\nI will present real-world examples of new and existing code, the tools used to write and maintain testable code and some simple rule-of-thumbs to keep in mind when developing for our beloved CMS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If \u201cWordPress is not testable\u201d then why bother about testable code at all? Because writing testable code is the first step to testing your code, testing your code is the first step to testing ALL your code, testing all your &hellip; <a href=\"https:\/\/torino.wordcamp.org\/2017\/session\/writing-testable-code-in-wordpress\/\">Continua la lettura <span class=\"screen-reader-text\">Writing testable code in WordPress (EN)<\/span>  <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":13208207,"featured_media":0,"template":"","meta":{"_wcpt_session_time":1491658200,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"http:\/\/wordpress.tv\/2017\/04\/13\/luca-tumedei-writing-testable-code-wordpress\/","_wcpt_speaker_id":[795],"footnotes":""},"session_track":[446658],"session_category":[],"class_list":["post-801","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-track-a"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/phePpp-cV","session_date_time":{"date":"08\/04\/2017","time":"2:30 pm"},"session_speakers":[{"id":"795","slug":"luca-tumedei","name":"Luca Tumedei","link":"https:\/\/torino.wordcamp.org\/2017\/speaker\/luca-tumedei\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/torino.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/torino.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/torino.wordcamp.org\/2017\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":2,"href":"https:\/\/torino.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/801\/revisions"}],"predecessor-version":[{"id":2189,"href":"https:\/\/torino.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/801\/revisions\/2189"}],"speakers":[{"embeddable":true,"href":"https:\/\/torino.wordcamp.org\/2017\/wp-json\/wp\/v2\/speakers\/795"}],"author":[{"embeddable":true,"href":"https:\/\/torino.wordcamp.org\/2017\/wp-json\/wporg\/v1\/users\/lucatume"}],"wp:attachment":[{"href":"https:\/\/torino.wordcamp.org\/2017\/wp-json\/wp\/v2\/media?parent=801"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/torino.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_track?post=801"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/torino.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_category?post=801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}