{"id":1190,"date":"2018-08-13T10:54:32","date_gmt":"2018-08-13T17:54:32","guid":{"rendered":"https:\/\/2018.la.wordcamp.org\/?post_type=wcb_session&#038;p=1190"},"modified":"2018-08-13T14:30:10","modified_gmt":"2018-08-13T21:30:10","slug":"how-to-start-testing-an-existing-wordpress-plugin-with-phpunit","status":"publish","type":"wcb_session","link":"https:\/\/la.wordcamp.org\/2018\/session\/how-to-start-testing-an-existing-wordpress-plugin-with-phpunit\/","title":{"rendered":"How to start testing an existing WordPress plugin with PHPUnit"},"content":{"rendered":"<p>PHPUnit is the standard PHP testing framework, but getting it working with a WordPress plugin is challenging. If you ever wanted to start adding automated tests to your code, but did not know how and where to start, this talk is for you.<br \/>\nThis presentation covers:<br \/>\n&#8211; brief introduction to unit and integration testing<br \/>\n&#8211; scaffolding a test suite for an existing WordPress plugin using WP-CLI<br \/>\n&#8211; refactoring the existing code to make it testable<br \/>\n&#8211; writing and running the first tests<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHPUnit is the standard PHP testing framework, but getting it working with a WordPress plugin is challenging. If you ever wanted to start adding automated tests to your code, but did not know how and where to start, this talk is for you. This presentation covers: &#8211; brief introduction to unit and integration testing &#8211; &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/la.wordcamp.org\/2018\/session\/how-to-start-testing-an-existing-wordpress-plugin-with-phpunit\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to start testing an existing WordPress plugin with PHPUnit&#8221;<\/span><\/a><\/p>\n","protected":false},"author":15047831,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1537651800,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[1124],"footnotes":""},"session_track":[1244532],"session_category":[5041],"class_list":["post-1190","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-development-track","wcb_session_category-developer"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9umPP-jc","jetpack_likes_enabled":false,"session_date_time":{"date":"September 22, 2018","time":"2:30 pm"},"session_speakers":[{"id":"1124","slug":"behzod-saidov","name":"Behzod Saidov","link":"https:\/\/la.wordcamp.org\/2018\/speaker\/behzod-saidov\/"}],"session_cats_rendered":"Developer","_links":{"self":[{"href":"https:\/\/la.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions\/1190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/la.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/la.wordcamp.org\/2018\/wp-json\/wp\/v2\/types\/wcb_session"}],"author":[{"embeddable":true,"href":"https:\/\/la.wordcamp.org\/2018\/wp-json\/wp\/v2\/users\/15047831"}],"version-history":[{"count":3,"href":"https:\/\/la.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions\/1190\/revisions"}],"predecessor-version":[{"id":1322,"href":"https:\/\/la.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions\/1190\/revisions\/1322"}],"speakers":[{"embeddable":true,"href":"https:\/\/la.wordcamp.org\/2018\/wp-json\/wp\/v2\/speakers\/1124"}],"wp:attachment":[{"href":"https:\/\/la.wordcamp.org\/2018\/wp-json\/wp\/v2\/media?parent=1190"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/la.wordcamp.org\/2018\/wp-json\/wp\/v2\/session_track?post=1190"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/la.wordcamp.org\/2018\/wp-json\/wp\/v2\/session_category?post=1190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}