{"id":983,"date":"2016-06-12T12:55:09","date_gmt":"2016-06-12T16:55:09","guid":{"rendered":"https:\/\/2016.boston.wordcamp.org\/?post_type=wcb_session&#038;p=983"},"modified":"2016-07-24T15:14:01","modified_gmt":"2016-07-24T19:14:01","slug":"writing-testable-plugins","status":"publish","type":"wcb_session","link":"https:\/\/boston.wordcamp.org\/2016\/session\/writing-testable-plugins\/","title":{"rendered":"Writing Testable Plugins"},"content":{"rendered":"<p>Over the course of WordPress&#8217;s existence, PHP has evolved into a first-class language. Unfortunately, left-overs like the global namespace make it all too easy to write code that&#8217;s hard to test. I&#8217;d like to take you on a tour through writing a WordPress plugin in a way that makes testing easy. Using features like generators, dependency injection, spies, and stubs, you can write tests which rock and produce better code while you&#8217;re at it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the course of WordPress&#8217;s existence, PHP has evolved into a first-class language. Unfortunately, left-overs like the global namespace make it all too easy to write code that&#8217;s hard to test. I&#8217;d like to take you on a tour through &hellip; <a href=\"https:\/\/boston.wordcamp.org\/2016\/session\/writing-testable-plugins\/\">Continue reading <span class=\"assistive-text\">Writing Testable Plugins<\/span>  <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":12034571,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1469304000,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"https:\/\/payton.codes\/testable-wordpress-plugins\/","_wcpt_session_video":"","_wcpt_speaker_id":[595],"footnotes":""},"session_track":[8858],"session_category":[],"class_list":["post-983","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-developers"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6YESU-fR","session_date_time":{"date":"July 23, 2016","time":"4:00 pm"},"session_speakers":[{"id":"595","slug":"payton-swick","name":"Payton Swick","link":"https:\/\/boston.wordcamp.org\/2016\/speaker\/payton-swick\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/boston.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions\/983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/boston.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/boston.wordcamp.org\/2016\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":1,"href":"https:\/\/boston.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions\/983\/revisions"}],"predecessor-version":[{"id":984,"href":"https:\/\/boston.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions\/983\/revisions\/984"}],"speakers":[{"embeddable":true,"href":"https:\/\/boston.wordcamp.org\/2016\/wp-json\/wp\/v2\/speakers\/595"}],"author":[{"embeddable":true,"href":"https:\/\/boston.wordcamp.org\/2016\/wp-json\/wporg\/v1\/users\/sirbrillig"}],"wp:attachment":[{"href":"https:\/\/boston.wordcamp.org\/2016\/wp-json\/wp\/v2\/media?parent=983"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/boston.wordcamp.org\/2016\/wp-json\/wp\/v2\/session_track?post=983"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/boston.wordcamp.org\/2016\/wp-json\/wp\/v2\/session_category?post=983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}