{"id":20,"date":"2008-10-19T09:26:18","date_gmt":"2008-10-19T16:26:18","guid":{"rendered":"http:\/\/kellytehuna.com\/blog\/?p=20"},"modified":"2008-10-19T09:32:02","modified_gmt":"2008-10-19T16:32:02","slug":"phpundercontrol-continuous-integration","status":"publish","type":"post","link":"http:\/\/kellytehuna.com\/blog\/2008\/10\/19\/phpundercontrol-continuous-integration\/","title":{"rendered":"phpUnderControl &#8211; Continuous Integration"},"content":{"rendered":"<p>Well, over the last 3 days or so, I&#8217;ve been doing some serious unit testing with <a href=\"http:\/\/phpun.it\" target=\"_blank\">PHPUnit<\/a>. \u00a0Unfortunately, I didn&#8217;t start writing any serious tests until two days AFTER I started having problems testing my class hierarchy.<\/p>\n<p>One of the problems that arose while I was writing the first couple of unit tests, was I realized that I didn&#8217;t know how to test Abstract classes. \u00a0In my search to <a href=\"http:\/\/c2.com\/cgi\/wiki?AbstractTestCases\" target=\"_blank\">find a solution<\/a>, I vaguely remembered a tool called <a href=\"http:\/\/www.phpundercontrol.org\">phpUnderControl<\/a>.<!--more--><\/p>\n<p>phpUnderControl is a Continuous Integration tool. \u00a0For anyone from a Java background, think <a href=\"http:\/\/cruisecontrol.sourceforge.net\/\" target=\"_blank\">CruiseControl<\/a> and you know what I&#8217;m talking about. \u00a0phpUnderControl is in fact a plugin for CruiseControl. \u00a0The idea behind Continuous Integration is simply this: automate the build; make the build self-testing; use some kind of Source Control system to maintain the code.<\/p>\n<p>The reason for this become clear when you work in a distributed, collaborative environment. \u00a0If everyone commits to the repository regularly, but no tests are run on each commit, there is no way to know if that latest commit has &#8220;integrated&#8221; in to the system correctly. \u00a0By building the system every time there is a commit AND running the test suite over the newly committed code, you ensure that you&#8217;re code works and integrates into the rest of the system BEFORE it gets picked up by anyone else and ruins their local install.<\/p>\n<p>The fact that your unit tests are run for you, the documentation gets built for you and you get to see a bunch of metrics on your code quality, test results, etc., makes phpUnderControl a really useful package and I would recommend anybody take the time to try it out and see how it works for you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, over the last 3 days or so, I&#8217;ve been doing some serious unit testing with PHPUnit. \u00a0Unfortunately, I didn&#8217;t start writing any serious tests until two days AFTER I started having problems testing my class hierarchy. One of the problems that arose while I was writing the first couple of unit tests, was I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[20,19,21,11],"tags":[134,133,135,22],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry","category-continuous-integration","category-cruisecontrol","category-phpundercontrol","category-software","tag-continuous-integration","tag-cruisecontrol","tag-phpundercontrol","tag-phpunit"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2FJaA-k","jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/kellytehuna.com\/blog\/wp-json\/wp\/v2\/posts\/20"}],"collection":[{"href":"http:\/\/kellytehuna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/kellytehuna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/kellytehuna.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/kellytehuna.com\/blog\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":6,"href":"http:\/\/kellytehuna.com\/blog\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"predecessor-version":[{"id":23,"href":"http:\/\/kellytehuna.com\/blog\/wp-json\/wp\/v2\/posts\/20\/revisions\/23"}],"wp:attachment":[{"href":"http:\/\/kellytehuna.com\/blog\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/kellytehuna.com\/blog\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/kellytehuna.com\/blog\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}