{"id":1056,"date":"2015-09-20T11:13:02","date_gmt":"2015-09-20T16:13:02","guid":{"rendered":"https:\/\/2015.toronto.wordcamp.org\/?post_type=wcb_session&#038;p=1056"},"modified":"2015-09-24T09:20:53","modified_gmt":"2015-09-24T14:20:53","slug":"introduction-to-wordpress-unit-testing","status":"publish","type":"wcb_session","link":"https:\/\/toronto.wordcamp.org\/2015\/session\/introduction-to-wordpress-unit-testing\/","title":{"rendered":"Introduction to WordPress unit testing"},"content":{"rendered":"<p>&#8220;But this worked the other day!&#8221;\u00a0We&#8217;ve all had those moments (maybe you even had one today). It&#8217;s so frustrating when things that used to work break. Sometimes, you feel a bit silly. Other times, you&#8217;re ready to flip a table.\u00a0Well, put that table back down!<!--more--><\/p>\n<p>Let unit testing save you from this nightmare. It&#8217;s a lot like coding with a safety net (or body armor if that&#8217;s how you roll). It lets you go a bit crazy while minimizing repercussions (as long as the police don&#8217;t show up).<\/p>\n<p>Want to try something new? No worries! It&#8217;ll let you know if something isn&#8217;t working as it should. That&#8217;s how most paid plugins maintain a high level of quality over the years.<\/p>\n<p>If that sounds good to you, then you&#8217;ll love this talk. We&#8217;ll go over what unit testing is and its benefits. We&#8217;ll also look at how to get you started and how to write your first test.<\/p>\n<p><strong>Learning Outcomes:<\/strong><\/p>\n<ul>\n<li>Explore the concepts behind unit testing.<\/li>\n<li>Understand the benefits of unit testing.<\/li>\n<li>Install PHP unit test libraries.<\/li>\n<li>Write a unit test for a WordPress plugin.<\/li>\n<li>Run your plugin unit test suite.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;But this worked the other day!&#8221;\u00a0We&#8217;ve all had those moments (maybe you even had one today). It&#8217;s so frustrating when things that used to work break. Sometimes, you feel a bit silly. Other times, you&#8217;re ready to flip a table.\u00a0Well, put that table back down!<\/p>\n","protected":false},"author":7673567,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1443898800,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[520],"footnotes":""},"session_track":[8858],"session_category":[],"class_list":["post-1056","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-developers"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5UjGY-h2","jetpack_likes_enabled":false,"session_date_time":{"date":"October 3, 2015","time":"2:00 pm"},"session_speakers":[{"id":"520","slug":"carl-alexander","name":"Carl Alexander","link":"https:\/\/toronto.wordcamp.org\/2015\/speaker\/carl-alexander\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/toronto.wordcamp.org\/2015\/wp-json\/wp\/v2\/sessions\/1056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toronto.wordcamp.org\/2015\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/toronto.wordcamp.org\/2015\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":1,"href":"https:\/\/toronto.wordcamp.org\/2015\/wp-json\/wp\/v2\/sessions\/1056\/revisions"}],"predecessor-version":[{"id":1057,"href":"https:\/\/toronto.wordcamp.org\/2015\/wp-json\/wp\/v2\/sessions\/1056\/revisions\/1057"}],"speakers":[{"embeddable":true,"href":"https:\/\/toronto.wordcamp.org\/2015\/wp-json\/wp\/v2\/speakers\/520"}],"author":[{"embeddable":true,"href":"https:\/\/toronto.wordcamp.org\/2015\/wp-json\/wporg\/v1\/users\/carlalexander"}],"wp:attachment":[{"href":"https:\/\/toronto.wordcamp.org\/2015\/wp-json\/wp\/v2\/media?parent=1056"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/toronto.wordcamp.org\/2015\/wp-json\/wp\/v2\/session_track?post=1056"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/toronto.wordcamp.org\/2015\/wp-json\/wp\/v2\/session_category?post=1056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}