<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jeremykendall.net &#187; phpunit</title>
	<atom:link href="http://www.jeremykendall.net/tag/phpunit/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeremykendall.net</link>
	<description>{web developer, entrepreneur }</description>
	<lastBuildDate>Fri, 23 Jul 2010 19:18:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ZF-7984 &#8211; Zend_Tool Exits with Fatal Errors after installing PHPUnit 3.4.0+</title>
		<link>http://www.jeremykendall.net/2009/10/21/zf-7984-zend_tool-exits-with-fatal-errors-after-installing-phpunit-3-4-0/</link>
		<comments>http://www.jeremykendall.net/2009/10/21/zf-7984-zend_tool-exits-with-fatal-errors-after-installing-phpunit-3-4-0/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 15:28:14 +0000</pubDate>
		<dc:creator>Jeremy Kendall</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.jeremykendall.net/?p=197</guid>
		<description><![CDATA[I&#8217;m lucky enough to have made it to ZendCon again this year, and I&#8217;m having a blast learning new stuff, hanging out with old friends, making new friends, and generally grabbing up as much schwag as possible.
One of the topics that I&#8217;m most interested in is unit testing, specifically unit testing Zend Framework MVC apps.  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m lucky enough to have made it to <a href="http://zendcon.com/">ZendCon</a> again this year, and I&#8217;m having a blast learning new stuff, hanging out with old friends, making new friends, and generally grabbing up as much schwag as possible.</p>
<p>One of the topics that I&#8217;m most interested in is unit testing, specifically unit testing <a href="http://framework.zend.com/">Zend Framework</a> MVC apps.  While there&#8217;s a lot I have yet to learn on that topic, I ran into a bug last night that I wanted to let you know about.</p>
<p>In preparation to dig into ZF unit testing, I updated my install of <a href="http://www.phpunit.de/">PHPUnit</a> to the latest version (currently 3.4.1, installed via <a href="http://pear.php.net/">PEAR</a>).  When I tried to create a new ZF project using <a href="http://framework.zend.com/manual/en/zend.application.quick-start.html#zend.application.quick-start.zend-tool">Zend_Tool</a>, I received the following error:</p>

<div class="wp_syntax"><div class="code"><pre class="code" style="font-family:monospace;">jkendall@san-diego:~/dev/www$ zf create project asplode
&nbsp;
Fatal error: Cannot redeclare class phpunit_framework_testsuite_dataprovider in /usr/share/php/PHPUnit/Framework/TestSuite/DataProvider.php on line 64
&nbsp;
Call Stack:
    0.0020     111440   1. {main}() /usr/share/phplib/ZendFramework-1.9.3PL1/bin/zf.php:0
    0.0020     111560   2. zf_main() /usr/share/phplib/ZendFramework-1.9.3PL1/bin/zf.php:23
    0.0220     686832   3. zf_run($zfConfig = array ('HOME' =&gt; '/home/jkendall')) /usr/share/phplib/ZendFramework-1.9.3PL1/bin/zf.php:36
    0.0221     686952   4. Zend_Tool_Framework_Client_Console::main($options = array ()) /usr/share/phplib/ZendFramework-1.9.3PL1/bin/zf.php:214
    0.0221     687440   5. Zend_Tool_Framework_Client_Abstract-&gt;dispatch() /usr/share/phplib/ZendFramework-1.9.3PL1/library/Zend/Tool/Framework/Client/Console.php:96
    0.0222     687560   6. Zend_Tool_Framework_Client_Abstract-&gt;initialize() /usr/share/phplib/ZendFramework-1.9.3PL1/library/Zend/Tool/Framework/Client/Abstract.php:209
    0.0296     866600   7. Zend_Tool_Framework_Loader_Abstract-&gt;load() /usr/share/phplib/ZendFramework-1.9.3PL1/library/Zend/Tool/Framework/Client/Abstract.php:118
    0.4100    2729736   8. include_once('/usr/share/php/PHPUnit/Framework/TestSuite/DataProvider.php') /usr/share/phplib/ZendFramework-1.9.3PL1/library/Zend/Tool/Framework/Loader/Abstract.php:90
&nbsp;
jkendall@san-diego:~/dev/www$</pre></div></div>

<p>As it turns out, this is a known bug in version 1.9.0+ of the Zend Framework.  See <a href="http://framework.zend.com/issues/browse/ZF-7894">ZF-7894</a> in the ZF issue tracker for full details.  While this issue is not yet resolved in the tracker, <a href="http://raphaelstolt.blogspot.com/">Raphael Stolt</a> has <a href="http://framework.zend.com/issues/browse/ZF-7894?focusedCommentId=34826&amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_34826">provided a workaround</a> in the form of a diff file attached to the issue.  While your mileage may vary, the patch worked perfectly for me.  I&#8217;m able to go ahead and dive into unit testing my Zend Framework applications.</p>
<p><strong>UPDATE</strong>: <a href="http://framework.zend.com/issues/browse/ZF-7894">ZF-7894</a> was resolved during Bug Hunt days this week.  Many thanks to Benjamin Eberlei!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremykendall.net/2009/10/21/zf-7984-zend_tool-exits-with-fatal-errors-after-installing-phpunit-3-4-0/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
