<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Digital Sandwich - PHP Testing</title>
    <link>http://www.ds-o.com/</link>
    <description>PHP, Music, and other stuff</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.2 - http://www.s9y.org/</generator>
    <pubDate>Wed, 04 Feb 2009 03:56:00 GMT</pubDate>

    <image>
        <url>http://www.ds-o.com/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Digital Sandwich - PHP Testing - PHP, Music, and other stuff</title>
        <link>http://www.ds-o.com/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>YAML Now Supported by PHPUnit Database Extension</title>
    <link>http://www.ds-o.com/archives/79-YAML-Now-Supported-by-PHPUnit-Database-Extension.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/79-YAML-Now-Supported-by-PHPUnit-Database-Extension.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=79</wfw:comment>

    <slash:comments>8</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=79</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    &lt;p&gt;I have now just committed &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=246&amp;amp;entry_id=79&quot; title=&quot;http://yaml.org/&quot;  onmouseover=&quot;window.status=&#039;http://yaml.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;YAML&lt;/a&gt; data sets to the Database Extension for &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=247&amp;amp;entry_id=79&quot; title=&quot;http://www.phpun.it&quot;  onmouseover=&quot;window.status=&#039;http://www.phpun.it&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;PHPUnit&lt;/a&gt;. So now all those that love the simplicity and straightforwardness of YAML can use it with your data sets. I have also created a persistor for YAML datasets so you can easily convert existing data sets or database data into YAML representations.&lt;/p&gt;

&lt;p&gt;This is really the first I have dealt with YAML and it is definitely a viable alternative for data sets. Here is what they will look like.&lt;/p&gt;

&lt;div style=&quot;text-align: left&quot;&gt;&lt;br /&gt;table1:&lt;br /&gt;&amp;#160; -&lt;br /&gt;&amp;#160; &amp;#160; table1_id: 1&lt;br /&gt;&amp;#160; &amp;#160; columnName1: &amp;quot;tgfahgasdf&amp;quot;&lt;br /&gt;&amp;#160; &amp;#160; columnName2: 200&lt;br /&gt;&amp;#160; &amp;#160; columnName3: 34.64&lt;br /&gt;&amp;#160; &amp;#160; columnName4: yghkf;a&amp;#160; hahfg8ja h;&lt;br /&gt;table2:&lt;br /&gt;&amp;#160; -&lt;br /&gt;&amp;#160; &amp;#160; table2_id: 1&lt;br /&gt;&amp;#160; &amp;#160; column5: fhah&lt;br /&gt;&amp;#160; &amp;#160; column6: 456&lt;br /&gt;&amp;#160; &amp;#160; column7: 46.5&lt;br /&gt;&amp;#160; &amp;#160; column8: &amp;quot;fsdb, ghfdas&amp;quot;&lt;br /&gt;&amp;#160; -&lt;br /&gt;&amp;#160; &amp;#160; table2_id: 3&lt;br /&gt;&amp;#160; &amp;#160; column5: ajsdlkfguitah&lt;br /&gt;&amp;#160; &amp;#160; column6: 654&lt;br /&gt;&amp;#160; &amp;#160; column7: blah&lt;br /&gt;&amp;#160; &amp;#160; column8: |-&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; thesethasdl&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; asdflkjsadf asdfsadfhl &amp;quot;adsf, halsdf&amp;quot; sadfhlasdf&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;The biggest issue I had was figuring out how YAML dealt with trailing line breaks. It appears that &#039;|-&#039; did the trick. It will strip the final line break. Another thing to take note is that indention is important. It doesn&#039;t HAVE to be spaces (it can be tabs) it just needs to be consistent. The last thing is that strings do not need to be quoted, but if they are you can use escape characters (like \n.)&lt;/p&gt;

&lt;p&gt;This was committed to the trunk of PHPUnit and I anticipate Sebastian will be merging it back into 3.4 shortly.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sun, 01 Feb 2009 13:22:13 -0500</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/79-guid.html</guid>
    
</item>
<item>
    <title>Improved PHPUnit Filters</title>
    <link>http://www.ds-o.com/archives/78-Improved-PHPUnit-Filters.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/78-Improved-PHPUnit-Filters.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=78</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=78</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    &lt;p&gt;I have finally gotten some time to do some long awaited work on PHPUnit. The first on my agenda was a small improvement to filtering. This was related to &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=237&amp;amp;entry_id=78&quot; title=&quot;http://www.phpunit.de/ticket/526&quot;  onmouseover=&quot;window.status=&#039;http://www.phpunit.de/ticket/526&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;ticket #526&lt;/a&gt;. Essentially I added the ability to do both white list and black list filtering.
&lt;/p&gt;

&lt;p&gt;For instance, if you wanted to specify an include filter you can do the following:&lt;/p&gt;

&lt;div class=&quot;php&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//... &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; PHPUnit_Extensions_Database_DataSet_DataSetFilter&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$dataSet&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;addIncludeTables&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table1&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table3&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;setIncludeColumnsForTable&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table1&#039;&lt;/span&gt;, &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column1&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column2&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column3&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column4&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;setIncludeColumnsForTable&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table3&#039;&lt;/span&gt;, &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column9&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column10&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column11&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column12&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//... &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;

&lt;p&gt;I have also deprecated passing the filter to the constructor. The reason for this is that I would like to begin adding a few more features to the filter and the current method of passing the parameters on the constructor would be unintuitive for these planned features. Basically I think it was a mistake for me to allow the passing of filter data on the constructor to begin with. I anticipate the current method working up to PHPUnit 4.0 but it will not be expanded on and will be removed either in PHPUnit 4 or in a release soon after that.
&lt;/p&gt;

&lt;p&gt;So, for exclude filters, instead of specifying them in the constructor, the new method will be:&lt;/p&gt;

&lt;div class=&quot;php&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; PHPUnit_Extensions_Database_DataSet_DataSetFilter&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$dataSet&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;addExcludeTables&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table2&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;setExcludeColumnsForTable&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table1&#039;&lt;/span&gt;, &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table1_id&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;setExcludeColumnsForTable&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table3&#039;&lt;/span&gt;, &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table3_id&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//... &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;

&lt;p&gt;While you can&#039;t mix include and exclude filters for tables (wouldn&#039;t make sense right now) you CAN do this for table columns of separate tables:&lt;/p&gt;

&lt;div class=&quot;php&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt; = &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; PHPUnit_Extensions_Database_DataSet_DataSetFilter&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$dataSet&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;addIncludeTables&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table1&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table3&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;setExcludeColumnsForTable&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table1&#039;&lt;/span&gt;, &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table1_id&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;; &lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$filteredDataSet&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;setIncludeColumnsForTable&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;table3&#039;&lt;/span&gt;, &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column9&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column10&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column11&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;column12&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;//... &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;

&lt;p&gt;Some future features I plan on adding include, global column includes/excludes and wild cards. Anyhow, hope this is useful for someone.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sat, 31 Jan 2009 23:54:28 -0500</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/78-guid.html</guid>
    
</item>
<item>
    <title>2008 DC PHP Conference - Advanced PHPUnit Testing</title>
    <link>http://www.ds-o.com/archives/74-2008-DC-PHP-Conference-Advanced-PHPUnit-Testing.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/74-2008-DC-PHP-Conference-Advanced-PHPUnit-Testing.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=74</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=74</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    
&lt;p&gt;And here are the advanced PHPUnit slides!&lt;/p&gt;
&lt;div id=&quot;__ss_446619&quot; style=&quot;width: 425px; text-align: left;&quot;&gt;&lt;object width=&quot;425&quot; height=&quot;355&quot; style=&quot;margin: 0px;&quot;&gt;&lt;param value=&quot;http://static.slideshare.net/swf/ssplayer2.swf?doc=advanced-php-unit-testing2-1212587249704441-9&quot; name=&quot;movie&quot; /&gt;&lt;param value=&quot;true&quot; name=&quot;allowFullScreen&quot; /&gt;&lt;param value=&quot;always&quot; name=&quot;allowScriptAccess&quot; /&gt;&lt;embed width=&quot;425&quot; height=&quot;355&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; type=&quot;application/x-shockwave-flash&quot; src=&quot;http://static.slideshare.net/swf/ssplayer2.swf?doc=advanced-php-unit-testing2-1212587249704441-9&quot; /&gt;&lt;/object&gt;&lt;div style=&quot;font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;&quot;&gt;&lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=211&amp;amp;entry_id=74&quot; title=&quot;http://www.slideshare.net/?src=embed&quot;  onmouseover=&quot;window.status=&#039;http://www.slideshare.net/?src=embed&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;&lt;img alt=&quot;SlideShare&quot; style=&quot;border: 0px none ; margin-bottom: -5px;&quot; src=&quot;http://static.slideshare.net/swf/logo_embd.png&quot; /&gt;&lt;/a&gt; | &lt;a title=&quot;View Advanced PHPUnit Testing on SlideShare&quot; href=&quot;http://www.ds-o.com/exit.php?url_id=212&amp;amp;entry_id=74&quot;  onmouseover=&quot;window.status=&#039;http://www.slideshare.net/mjlivelyjr/advanced-phpunit-testing?src=embed&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;View&lt;/a&gt; | &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=213&amp;amp;entry_id=74&quot; title=&quot;http://www.slideshare.net/upload?src=embed&quot;  onmouseover=&quot;window.status=&#039;http://www.slideshare.net/upload?src=embed&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Upload your own&lt;/a&gt;&lt;/div&gt;&lt;/div&gt; 
    </content:encoded>

    <pubDate>Wed, 04 Jun 2008 09:55:41 -0400</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/74-guid.html</guid>
    
</item>
<item>
    <title>2008 DC PHP Conference - Automated Unit Testing</title>
    <link>http://www.ds-o.com/archives/73-2008-DC-PHP-Conference-Automated-Unit-Testing.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/73-2008-DC-PHP-Conference-Automated-Unit-Testing.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=73</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=73</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    &lt;p&gt;As promised here are my automated unit testing slides for the 2008 DC PHP conference.&lt;/p&gt;
&lt;div style=&quot;width:425px;text-align:left&quot; id=&quot;__ss_446614&quot;&gt;&lt;object style=&quot;margin:0px&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://static.slideshare.net/swf/ssplayer2.swf?doc=automated-unit-testing-1212587126813053-9&quot;/&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;/&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;/&gt;&lt;embed src=&quot;http://static.slideshare.net/swf/ssplayer2.swf?doc=automated-unit-testing-1212587126813053-9&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style=&quot;font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;&quot;&gt;&lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=208&amp;amp;entry_id=73&quot; title=&quot;http://www.slideshare.net/?src=embed&quot;  onmouseover=&quot;window.status=&#039;http://www.slideshare.net/?src=embed&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;&lt;img src=&quot;http://static.slideshare.net/swf/logo_embd.png&quot; style=&quot;border:0px none;margin-bottom:-5px&quot; alt=&quot;SlideShare&quot;/&gt;&lt;/a&gt; | &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=209&amp;amp;entry_id=73&quot;  onmouseover=&quot;window.status=&#039;http://www.slideshare.net/mjlivelyjr/automated-unit-testing?src=embed&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;View Automated Unit Testing on SlideShare&quot;&gt;View&lt;/a&gt; | &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=210&amp;amp;entry_id=73&quot; title=&quot;http://www.slideshare.net/upload?src=embed&quot;  onmouseover=&quot;window.status=&#039;http://www.slideshare.net/upload?src=embed&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Upload your own&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
 
    </content:encoded>

    <pubDate>Wed, 04 Jun 2008 09:52:32 -0400</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/73-guid.html</guid>
    
</item>
<item>
    <title>Adding Database Tests to Existing PHPUnit Test Cases</title>
    <link>http://www.ds-o.com/archives/64-Adding-Database-Tests-to-Existing-PHPUnit-Test-Cases.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/64-Adding-Database-Tests-to-Existing-PHPUnit-Test-Cases.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=64</wfw:comment>

    <slash:comments>10</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=64</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    

&lt;p&gt;When I was first creating the &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=170&amp;amp;entry_id=64&quot;  onmouseover=&quot;window.status=&#039;http://www.ds-o.com/archives/63-PHPUnit-Database-Extension-DBUnit-Port.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;PHPUnit Database Extensions (DBUnit Port)&quot;&gt;Database Extension&lt;/a&gt; for &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=171&amp;amp;entry_id=64&quot;  onmouseover=&quot;window.status=&#039;http://www.phpunit.de&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;PHPUnit&quot;&gt;PHPUnit&lt;/a&gt; I realized that there was a very high likelihood that several people would have tests that were already written that they would like to add additional database tests too. To accomplish this I actually wrote the &lt;b&gt;PHPUnit_Extensions_Database_DefaultTester&lt;/b&gt; class. In fact, if you were to look at the source of the database test case you will see that all of it&#039;s operations are actually forwarded to this class which does all of the work.&lt;/p&gt;

&lt;p&gt;Please continue reading to see how you can use composition to add database tests to your existing test cases.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.ds-o.com/archives/64-Adding-Database-Tests-to-Existing-PHPUnit-Test-Cases.html#extended&quot;&gt;Continue reading &quot;Adding Database Tests to Existing PHPUnit Test Cases&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 05 Sep 2007 00:00:00 -0400</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/64-guid.html</guid>
    
</item>
<item>
    <title>PHPUnit Database Extension (DBUnit Port)</title>
    <link>http://www.ds-o.com/archives/63-PHPUnit-Database-Extension-DBUnit-Port.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/63-PHPUnit-Database-Extension-DBUnit-Port.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=63</wfw:comment>

    <slash:comments>57</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=63</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    
&lt;p&gt;I have completed the initial feature set for the Database extension to &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=158&amp;amp;entry_id=63&quot;  onmouseover=&quot;window.status=&#039;http://www.phpunit.de&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;PHPUnit&quot;&gt;PHPUnit&lt;/a&gt;. This is a essentially a port of &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=159&amp;amp;entry_id=63&quot;  onmouseover=&quot;window.status=&#039;http://dbunit.sourceforge.net/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;DBUnit&quot;&gt;DBUnit&lt;/a&gt; to &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=160&amp;amp;entry_id=63&quot; title=&quot;http://www.php.net&quot;  onmouseover=&quot;window.status=&#039;http://www.php.net&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;PHP&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;For those that may not have read any of my &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=161&amp;amp;entry_id=63&quot;  onmouseover=&quot;window.status=&#039;http://www.ds-o.com/archives/62-PHPDBUnit-Testing-DB-interaction-with-PHPUnit.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;PHPDBUnit Testing DB interaction with PHPUnit&quot;&gt;previous postings&lt;/a&gt; on the subject the goal of this software is to extend the functionality of PHPUnit to allow using seed data to put a given database into a known state prior to executing each test. It also provides an easy mechanism to compare database contents with an expected dataset.&lt;/p&gt;&lt;p&gt;The database extension has recently been merged into the PHPUnit 3.2 branch and is scheduled to be released in that version. &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=162&amp;amp;entry_id=63&quot;  onmouseover=&quot;window.status=&#039;http://sebastian-bergmann.de/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;Sebastian Bergmann&quot;&gt;Sebastian Bergmann&lt;/a&gt; will be introducing the extension in his &lt;a title=&quot;Advanced Testing with PHPUnit&quot; href=&quot;http://www.ds-o.com/exit.php?url_id=163&amp;amp;entry_id=63&quot;  onmouseover=&quot;window.status=&#039;http://works.phparch.com/c/schedule/talk/d2s5/0&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Advanced Testing with PHPUnit&lt;/a&gt; talk at &lt;a title=&quot;PHP|Works 2007&quot; href=&quot;http://www.ds-o.com/exit.php?url_id=164&amp;amp;entry_id=63&quot;  onmouseover=&quot;window.status=&#039;http://works.phparch.com/c/p/index&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;PHP|Works 2007&lt;/a&gt; in Atlanta September 13 - 14. If you would like to tinker around with the database extension prior to it&#039;s release you can always download the latest copy of PHPUnit 3.2 from svn: svn://svn.phpunit.de/phpunit/phpunit/branches/3.2. The source can also be browsed at &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=165&amp;amp;entry_id=63&quot; title=&quot;http://www.phpunit.de/browser/phpunit/branches/3.2/PHPUnit/Extensions/Database&quot;  onmouseover=&quot;window.status=&#039;http://www.phpunit.de/browser/phpunit/branches/3.2/PHPUnit/Extensions/Database&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;http://www.phpunit.de/browser/phpunit/branches/3.2/PHPUnit/Extensions/Database&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Please continue reading for an example of how you can now use PHPUnit to even more effectively test data-centric applications.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.ds-o.com/archives/63-PHPUnit-Database-Extension-DBUnit-Port.html#extended&quot;&gt;Continue reading &quot;PHPUnit Database Extension (DBUnit Port)&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 02 Sep 2007 15:55:16 -0400</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/63-guid.html</guid>
    
</item>
<item>
    <title>Finally used PHPUnit and I like it</title>
    <link>http://www.ds-o.com/archives/56-Finally-used-PHPUnit-and-I-like-it.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/56-Finally-used-PHPUnit-and-I-like-it.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=56</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=56</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    &lt;p&gt;I have been working quite a bit lately with the cvs version &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=132&amp;amp;entry_id=56&quot; title=&quot;http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/&quot;  onmouseover=&quot;window.status=&#039;http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;PHPUnit3&lt;/a&gt;. I have spent alot of time in testing using &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=133&amp;amp;entry_id=56&quot; title=&quot;http://www.lastcraft.com/simple_test.php&quot;  onmouseover=&quot;window.status=&#039;http://www.lastcraft.com/simple_test.php&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;SimpleTest&lt;/a&gt; and I have also given some time to &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=134&amp;amp;entry_id=56&quot; title=&quot;http://shiflett.org/archive/187&quot;  onmouseover=&quot;window.status=&#039;http://shiflett.org/archive/187&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;test-more.php&lt;/a&gt;. However, up until just recently I had honestly never used PHPUnit before. The big motivational factor for me (other than to try something new) was to see how the &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=135&amp;amp;entry_id=56&quot; title=&quot;http://www.phpunit.de/pocket_guide/3.0/en/code-coverage-analysis.html&quot;  onmouseover=&quot;window.status=&#039;http://www.phpunit.de/pocket_guide/3.0/en/code-coverage-analysis.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;code coverage&lt;/a&gt; feature was coming along.&lt;/p&gt;&lt;p&gt;I would have to say that after a few weeks of tinkering with it I am impressed. Now, keep in mind that I am talking about software that is still in development, so a degree of lattitude is required. The featureset of PHPUnit 3 is great. Here are a few notable features (in my mind):&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Mock objects&lt;/li&gt;&lt;li&gt;Code Coverage Analysis&lt;/li&gt;&lt;li&gt;Multitude of test logging options&lt;/li&gt;&lt;li&gt;Built well for testing &amp;gt;php5 applications&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Using the framework is an absolute breeze and there is excellent documentation in the form of a free book (draft version) written by &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=136&amp;amp;entry_id=56&quot; title=&quot;http://www.sebastian-bergmann.de/&quot;  onmouseover=&quot;window.status=&#039;http://www.sebastian-bergmann.de/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Sebastian Bergmann&lt;/a&gt; and published by O&#039;Reilly called &amp;quot;&lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=137&amp;amp;entry_id=56&quot; title=&quot;http://www.phpunit.de/pocket_guide/3.0/en/index.html&quot;  onmouseover=&quot;window.status=&#039;http://www.phpunit.de/pocket_guide/3.0/en/index.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;PHPUnit Pocket Guide.&lt;/a&gt;&amp;quot; The &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=138&amp;amp;entry_id=56&quot; title=&quot;http://www.phpunit.de/apidoc/&quot;  onmouseover=&quot;window.status=&#039;http://www.phpunit.de/apidoc/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;API&lt;/a&gt; is also documented quite nicely and serves as a good second-source for learning how to do specific things. &lt;/p&gt;&lt;p&gt;The most impressive part of this experience in my mind was how runnable the software is straight out of CVS. Most of the time when I am crazy enough to use CVS version I always seem to get my copy of the source at a point where it is very unstable and requires tweaking just to get the software to fulfill its basic requirements. PHPUnit 3 on the other hand was able to run in it&#039;s standard mode without a flaw. The only thing that was missing that I felt I needed was html reports for the pass/fail status of the unit tests. The report templates and code was already to a point however that it was actually fairly trivial for me to make the changes to it that I thought would be needed to make it work. I have since passed those changes along to Sebastian and they have been added to CVS, so html reports are now in the cvs version as well. It felt good to be able to contribute a little bit to a very worthwhile project.&lt;/p&gt;&lt;p&gt;Sebastian has posted about the &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=139&amp;amp;entry_id=56&quot; title=&quot;http://www.sebastian-bergmann.de/blog/archives/599-More-Work-on-Reporting-in-PHPUnit-3.html&quot;  onmouseover=&quot;window.status=&#039;http://www.sebastian-bergmann.de/blog/archives/599-More-Work-on-Reporting-in-PHPUnit-3.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;new reporting features&lt;/a&gt; on his blog that include some screenshots so I won&#039;t bother to rehash over all of that. You can just go check them out on his site.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 22 May 2006 10:56:54 -0400</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/56-guid.html</guid>
    
</item>
<item>
    <title>TAP Compliant PHP Testing Harness</title>
    <link>http://www.ds-o.com/archives/52-TAP-Compliant-PHP-Testing-Harness.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/52-TAP-Compliant-PHP-Testing-Harness.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=52</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=52</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    
&lt;p&gt;I have been doing a fair bit of thinking concerning testing over the last couple of days. This was partially driven by a couple of emails &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=100&amp;amp;entry_id=52&quot; title=&quot;http://paul-m-jones.com/blog/&quot;  onmouseover=&quot;window.status=&#039;http://paul-m-jones.com/blog/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Paul&lt;/a&gt; and I have sent back and forth as well as a &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=101&amp;amp;entry_id=52&quot; title=&quot;http://paul-m-jones.com/blog/?p=193&quot;  onmouseover=&quot;window.status=&#039;http://paul-m-jones.com/blog/?p=193&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;posting in his blog&lt;/a&gt;. I am of course a &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=102&amp;amp;entry_id=52&quot; title=&quot;http://www.digitalsandwich.com/archives/40-TAP-Format-Explained-Apache-Test.html&quot;  onmouseover=&quot;window.status=&#039;http://www.digitalsandwich.com/archives/40-TAP-Format-Explained-Apache-Test.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;big proponent of TAP&lt;/a&gt;. I think it provides alot of possibilities for integrating the current libraries that offer TAP support (&lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=103&amp;amp;entry_id=52&quot; title=&quot;http://shiflett.org/archive/187&quot;  onmouseover=&quot;window.status=&#039;http://shiflett.org/archive/187&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;test-more.php&lt;/a&gt;, &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=104&amp;amp;entry_id=52&quot; title=&quot;http://www.lastcraft.com/simple_test.php&quot;  onmouseover=&quot;window.status=&#039;http://www.lastcraft.com/simple_test.php&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;SimpleTest&lt;/a&gt; + &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=105&amp;amp;entry_id=52&quot; title=&quot;http://www.digitalsandwich.com/archives/51-Updated-Simpletest+Apache-Test.html&quot;  onmouseover=&quot;window.status=&#039;http://www.digitalsandwich.com/archives/51-Updated-Simpletest+Apache-Test.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;TAP-Reporter&lt;/a&gt;, &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=106&amp;amp;entry_id=52&quot; title=&quot;http://www.phpunit.de/wiki/Main_Page&quot;  onmouseover=&quot;window.status=&#039;http://www.phpunit.de/wiki/Main_Page&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;PHPUnit2&lt;/a&gt;.) However, having libraries that support TAP compliant output are honestly of little extra value if there isn&#039;t a way to read it and subsequently aggregate the data.&lt;/p&gt;&lt;p /&gt;&lt;p&gt;TAP Compliancy allows you to use any framework/harness that supports TAP. However, to date, the only harness I could find for reading TAP was perl&#039;s &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=107&amp;amp;entry_id=52&quot; title=&quot;http://search.cpan.org/~petdance/Test-Harness-2.56/lib/Test/Harness.pm&quot;  onmouseover=&quot;window.status=&#039;http://search.cpan.org/~petdance/Test-Harness-2.56/lib/Test/Harness.pm&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Test::Harness&lt;/a&gt; and the only framework was &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=108&amp;amp;entry_id=52&quot; title=&quot;http://httpd.apache.org/test/&quot;  onmouseover=&quot;window.status=&#039;http://httpd.apache.org/test/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Apache-Test&lt;/a&gt;. Now, I will be the first to admit that there is a fairly steep learning curve when it comes to using Apache-Test. Once you get the hang of it, things get pretty simple. Getting the hang of it though tends to be a problem. Because of this I thought it was time for someone to create a harness in php that is capable of being used to build a framework.&lt;/p&gt;&lt;p&gt;So, I spent my free time the last couple of days working on such an item and this is what I came up with: &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=109&amp;amp;entry_id=52&quot; title=&quot;http://www.digitalsandwich.com/test-harness.php&quot;  onmouseover=&quot;window.status=&#039;http://www.digitalsandwich.com/test-harness.php&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;test-harness.php&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This is a very rough first draft, if you will. I have successfully used it to run a 1,000 file testing suite that I use for my firm&#039;s internal API. It should be stated immediatly that my goal is NOT to mimic Test::Harness. My goal is to simply provide another option for people to use in their testing.&lt;/p&gt;&lt;p&gt;It is fairly simple to use. All you need to do is place it in your tests&#039; folder, make a few configuration changes (if necessary) and you will be ready to go. The script does depend on your test-files being self sustaining (to a point) and they must also output TAP compliant results. So basically if you can run your individual test files from the command line you should be alright.&lt;/p&gt;&lt;p&gt;There are three different configuration settings that need to be looked at. They can all be found at the top of the test-harness.php file. The first one is the TAP_PHP_CLI constant. This simple needs to be the path to your php-cli. The second one is TAP_PHP_CLI_ARGS. This can be used to pass command line arguments straight to php. I anticipate (as the default value shows) that this will be used most often to set the include_path for the testing scripts. The final setting is the $_EXCLUDE_FILES array. This is used to specify which files the harness should ignore when cycling through the directories. test-harness.php should of course always be set. I have also set test-more.php as I was using this library for most of my testing.&lt;/p&gt;&lt;p&gt;Here is a brief list of the current features:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Executes each test file in its own environment. This is accomplished by executing each test seperatly in it&#039;s own php-cli process.&lt;/li&gt;&lt;li&gt;Supports the full TAP protocol. Currently there is no PHP library (afaik) that fully supports TAP however I do know there are plans to enable this in at least test-more.php. So when that happens the harness will be ready.&lt;/li&gt;&lt;li&gt;Supports Multiple levels of verbosity. -s will not output anything (this can be used in automated build processes when you only need to know if the tests as a whole pass or fail.) --detail will output the overall test results as well as the TAP output of each test. By default only the overall pass/fail result of each file and a summary of failed tests, skipped tests, and bonus tests are displayed.&lt;/li&gt;&lt;li&gt;Uses a return value to indicate overall success or fail. The program will return 1 on success and 0 on fail.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This is the first version of this file and I plan on releasing many more in the very near future. Some features I have in mind for the future are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Better test filtering. Executing every file in the directory is just not always the best way to do things. I would like to set it so that only *.php (and maybe *.phpt) files are run as well as maybe introducing a default directory to store php files that aren&#039;t to be tested. Basically I want to get rid of the $_EXCLUDE_FILES array.&lt;/li&gt;&lt;li&gt;Support for running the harness over http and recieving pretty output.&lt;/li&gt;&lt;li&gt;Make the script more interactive (optionally for the cli)&lt;/li&gt;&lt;li&gt;There is also a host of additional features that I scribbled down on a notepad. If anybody else has any good ideas you are more than welcome to post them.&lt;/li&gt;&lt;/ul&gt; 
    </content:encoded>

    <pubDate>Fri, 03 Feb 2006 18:47:04 -0500</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/52-guid.html</guid>
    
</item>
<item>
    <title>Updated Simpletest+Apache-Test</title>
    <link>http://www.ds-o.com/archives/51-Updated-Simpletest+Apache-Test.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/51-Updated-Simpletest+Apache-Test.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=51</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=51</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    &lt;p&gt;A couple days ago I came across a &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=86&amp;amp;entry_id=51&quot;  onmouseover=&quot;window.status=&#039;http://shiflett.org/archive/173&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;_blank&quot; title=&quot;JApacheCon&quot;&gt;post&lt;/a&gt; in &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=87&amp;amp;entry_id=51&quot;  onmouseover=&quot;window.status=&#039;http://shiflett.org/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;_blank&quot; title=&quot;Chris Shiflett&quot;&gt;Chris Shiflett&#039;s blog&lt;/a&gt; concerning a tutorial that &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=88&amp;amp;entry_id=51&quot;  onmouseover=&quot;window.status=&#039;http://modperlcookbook.org/~geoff/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;_blank&quot; title=&quot;Geoff Young&quot;&gt;Geoff Young&lt;/a&gt; and he were giving at &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=89&amp;amp;entry_id=51&quot;  onmouseover=&quot;window.status=&#039;http://apachecon.com/2005/US/index/e=MjAwNS9VUw&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;_blank&quot; title=&quot;JApacheCon&quot;&gt;JApacheCon&lt;/a&gt;. Part of this post was giving some information on a small extension I wrote for &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=90&amp;amp;entry_id=51&quot;  onmouseover=&quot;window.status=&#039;http://www.lastcraft.com/simple_test.php&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;_blank&quot; title=&quot;SimpleTest&quot;&gt;SimpleTest&lt;/a&gt; called &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=91&amp;amp;entry_id=51&quot;  onmouseover=&quot;window.status=&#039;http://www.digitalsandwich.com/archives/41-Implementing-Apache-Test-Support-into-Simple-Test.html&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;_blank&quot; title=&quot;tap-reporter.php&quot;&gt;TAP Reporter&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I never realized anybody was actively using the extension and as a result I failed to develop it or even update the version I have on my site. Chris, Geoff, &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=92&amp;amp;entry_id=51&quot;  onmouseover=&quot;window.status=&#039;http://www.lastcraft.com/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;_blank&quot; title=&quot;Marcus Baker&quot;&gt;Marcus Baker&lt;/a&gt;, and I have since opened discussion on possible mods to Simple Test as well as a little discussion on how to make PHP testing an overall nicer experience. So it looks like there will be some changes to the TAP Reporter in the very near future.&lt;/p&gt;&lt;p&gt;That all being said, I do have an updated version of the tarball that fixes some bugs in tap-reporter.php and also enables a few more TAP featuers. The new features are support for SKIP and TODO directives as well as support for &#039;bail out!.&#039; The code is very well documented (yay me) so I don&#039;t think there&#039;s much of a need for me to describe how to use it.&lt;/p&gt;&lt;p&gt;If you want some general information on TAP, Apache-Test and how they relate to SimpleTest then take a look at my &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=93&amp;amp;entry_id=51&quot;  onmouseover=&quot;window.status=&#039;http://digitalsandwich.com/categories/9-PHP-Testing&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;_blank&quot; title=&quot;PHP Testing&quot;&gt;older posts on the subject&lt;/a&gt;. A link to the new tar ball can be found below.&lt;/p&gt;&lt;p&gt;&lt;a target=&quot;_blank&quot; title=&quot;simpletest_apache-test.tar.gz&quot; href=&quot;http://www.ds-o.com/uploads/Code/Misc/simpletest_apache-test.tar.gz&quot;&gt;simpletest_apache-test.tar.gz&lt;/a&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 15 Dec 2005 20:37:24 -0500</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/51-guid.html</guid>
    
</item>
<item>
    <title>Implementing Apache-Test Support into Simple Test</title>
    <link>http://www.ds-o.com/archives/41-Implementing-Apache-Test-Support-into-Simple-Test.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/41-Implementing-Apache-Test-Support-into-Simple-Test.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=41</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=41</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    
&lt;p&gt;I have successfully gotten &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=95&amp;amp;entry_id=41&quot; title=&quot;http://www.lastcraft.com/simple_test.php&quot;  onmouseover=&quot;window.status=&#039;http://www.lastcraft.com/simple_test.php&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Simple Test&lt;/a&gt; to test itself in &lt;a href=&quot;http://www.ds-o.com/exit.php?url_id=96&amp;amp;entry_id=41&quot; title=&quot;http://httpd.apache.org/test/&quot;  onmouseover=&quot;window.status=&#039;http://httpd.apache.org/test/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Apache-Test&lt;/a&gt;.
It wasn&#039;t that hard really. I have added very basic Apache-Test support
by just subclassing the SimpleReporter class in SimpleTest. The new
class name is &lt;strong&gt;TAPReporter&lt;/strong&gt;. It basically just allows a test to create TAP compliant (&lt;a href=&quot;../../archives/40-TAP-Format-Explained-Apache-Test.html&quot;&gt;see this post&lt;/a&gt;)
output which is then read by Apache-Test. There are a few things which
in my opinion could be changed in SimpleTest in order to make TAP
complancy much better and it would actually improve some of the
functionality of SimpleTest apart from Apache-Test. I am somewhat
hesitant to make those changes right now however as the code is not
mine and really should be discussed with the creator of SimpleTest.
(Which I do plan on doing.) I will outline later in this articles the
changes I think would be useful. For now I would just like to review
what I did do and how to run the tests.&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://www.ds-o.com/archives/41-Implementing-Apache-Test-Support-into-Simple-Test.html#extended&quot;&gt;Continue reading &quot;Implementing Apache-Test Support into Simple Test&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 05 May 2005 14:40:50 -0400</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/41-guid.html</guid>
    
</item>
<item>
    <title>TAP Format Explained (Apache-Test)</title>
    <link>http://www.ds-o.com/archives/40-TAP-Format-Explained-Apache-Test.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/40-TAP-Format-Explained-Apache-Test.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=40</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=40</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    As some of you know I am currently working on a project to allow &lt;a target=&quot;_blank&quot; href=&quot;http://www.ds-o.com/exit.php?url_id=43&amp;amp;entry_id=40&quot; title=&quot;http://www.lastcraft.com/simple_test.php&quot;  onmouseover=&quot;window.status=&#039;http://www.lastcraft.com/simple_test.php&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Simple Test&lt;/a&gt; to be &lt;a target=&quot;_blank&quot; href=&quot;http://www.ds-o.com/exit.php?url_id=44&amp;amp;entry_id=40&quot; title=&quot;http://httpd.apache.org/test/&quot;  onmouseover=&quot;window.status=&#039;http://httpd.apache.org/test/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Apache-Test&lt;/a&gt;
compliant. The process to take in doing so is to enable Simple Test to
produce TAP compliant output. To do so obviously requires a healthy
knowledge of the different aspects of the TAP protocol. The best way
for me to get a grasp of something is of course to write about it. I
gleaned pretty much all of this information from &lt;a target=&quot;_blank&quot; href=&quot;http://www.ds-o.com/exit.php?url_id=45&amp;amp;entry_id=40&quot; title=&quot;http://search.cpan.org/dist/Test-Harness/lib/Test/Harness/TAP.pod&quot;  onmouseover=&quot;window.status=&#039;http://search.cpan.org/dist/Test-Harness/lib/Test/Harness/TAP.pod&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;CPAN&#039;s TAP format documentation.&lt;/a&gt; &lt;br /&gt;&lt;a href=&quot;http://www.ds-o.com/archives/40-TAP-Format-Explained-Apache-Test.html#extended&quot;&gt;Continue reading &quot;TAP Format Explained (Apache-Test)&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 04 May 2005 20:15:46 -0400</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/40-guid.html</guid>
    
</item>
<item>
    <title>I think I finally understand Apache-Test</title>
    <link>http://www.ds-o.com/archives/38-I-think-I-finally-understand-Apache-Test.html</link>
            <category>PHP Testing</category>
    
    <comments>http://www.ds-o.com/archives/38-I-think-I-finally-understand-Apache-Test.html#comments</comments>
    <wfw:comment>http://www.ds-o.com/wfwcomment.php?cid=38</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.ds-o.com/rss.php?version=2.0&amp;type=comments&amp;cid=38</wfw:commentRss>
    

    <author>nospam@example.com (Mike Lively)</author>
    <content:encoded>
    
&lt;p&gt;I told Marcus Baker a couple of weeks ago that I would like to lend a hand in figuring out the best way to get &lt;a title=&quot;Simple Test&quot; target=&quot;_blank&quot; href=&quot;http://www.ds-o.com/exit.php?url_id=38&amp;amp;entry_id=38&quot;  onmouseover=&quot;window.status=&#039;http://www.lastcraft.com/simple_test.php&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;SimpleTest&lt;/a&gt; working with &lt;a title=&quot;Apache-Test&quot; target=&quot;_blank&quot; href=&quot;http://www.ds-o.com/exit.php?url_id=39&amp;amp;entry_id=38&quot;  onmouseover=&quot;window.status=&#039;http://httpd.apache.org/test/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Apache-Test&lt;/a&gt;. I actually was able to put quite a bit of time into this today and have achieved some results finally. Now, these results are far from a solution. All I have managed to do thus far really is to understand enough about the inner workings of Apache-Test so I can actually get a &amp;quot;self-created&amp;quot; test working inside of the Apache-Test environment.&lt;/p&gt;&lt;p /&gt; &lt;br /&gt;&lt;a href=&quot;http://www.ds-o.com/archives/38-I-think-I-finally-understand-Apache-Test.html#extended&quot;&gt;Continue reading &quot;I think I finally understand Apache-Test&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 25 Apr 2005 19:31:09 -0400</pubDate>
    <guid isPermaLink="false">http://www.ds-o.com/archives/38-guid.html</guid>
    
</item>

</channel>
</rss>