<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Unit Testing with the Zend Framework with Zend_Test and PHPUnit</title>
	<atom:link href="http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/</link>
	<description>free Zend Framework screencasts. Video tutorials to get you up to speed with different parts of the Zend Framework and enterprise PHP development.</description>
	<lastBuildDate>Wed, 01 Feb 2012 00:49:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Jens Held</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-33221</link>
		<dc:creator>Jens Held</dc:creator>
		<pubDate>Tue, 31 Jan 2012 22:16:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-33221</guid>
		<description>Ooops forgott this.
Before I did all that I did this...

sudo pear uninstall phpunit/PHP_TokenStream

sudo pear install phpunit/PHP_TokenStream-1.0.1</description>
		<content:encoded><![CDATA[<p>Ooops forgott this.<br />
Before I did all that I did this&#8230;</p>
<p>sudo pear uninstall phpunit/PHP_TokenStream</p>
<p>sudo pear install phpunit/PHP_TokenStream-1.0.1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens Held</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-33219</link>
		<dc:creator>Jens Held</dc:creator>
		<pubDate>Tue, 31 Jan 2012 21:42:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-33219</guid>
		<description>Hi, I&#039;m using OSX LION, and PHPUnit 3.6.9

And I ran into a problem:

&lt;i&gt;Declaration of Zend_Test_PHPUnit_Constraint_ResponseHeader::evaluate() should be compatible with that of PHPUnit_Framework_Constraint::evaluate()&lt;/i&gt;

Googled it.. Found a solution on StackOverFlow.com
&lt;i&gt;Zend Framework 1 applications currently, and possibly for quite some time, only function properly using PHPUnit 3.5.x&lt;/i&gt;

Solution: I Had to downgrade my PHPUnit version to 3.5.15

1) Uninstall current version
sudo pear uninstall phpunit/PHPUnit
sudo pear uninstall phpunit/DbUnit
sudo pear uninstall phpunit/PHP_CodeCoverage
sudo pear uninstall phpunit/File_Iterator
sudo pear uninstall phpunit/PHP_Timer
sudo pear uninstall phpunit/PHPUnit_MockObject
sudo pear uninstall phpunit/Text_Template
sudo pear uninstall phpunit/PHPUnit_Selenium
sudo pear uninstall pear.symfony-project.com/YAML

2) Install version 3.5.15
sudo pear install pear.symfony-project.com/YAML-1.0.2
sudo pear install phpunit/PHPUnit_Selenium-1.0.1
sudo pear install phpunit/PHPUnit_MockObject-1.0.3
sudo pear install phpunit/PHP_Timer-1.0.0
sudo pear install phpunit/File_Iterator-1.2.3
sudo pear install phpunit/PHP_CodeCoverage-1.0.2
sudo pear install phpunit/DbUnit-1.0.3
sudo pear install phpunit/PHPUnit-3.5.15

So far so good, that is I have not run into any problem so far after 2 days using this FIX.

Thanx for ZendCasts 1337!</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m using OSX LION, and PHPUnit 3.6.9</p>
<p>And I ran into a problem:</p>
<p><i>Declaration of Zend_Test_PHPUnit_Constraint_ResponseHeader::evaluate() should be compatible with that of PHPUnit_Framework_Constraint::evaluate()</i></p>
<p>Googled it.. Found a solution on StackOverFlow.com<br />
<i>Zend Framework 1 applications currently, and possibly for quite some time, only function properly using PHPUnit 3.5.x</i></p>
<p>Solution: I Had to downgrade my PHPUnit version to 3.5.15</p>
<p>1) Uninstall current version<br />
sudo pear uninstall phpunit/PHPUnit<br />
sudo pear uninstall phpunit/DbUnit<br />
sudo pear uninstall phpunit/PHP_CodeCoverage<br />
sudo pear uninstall phpunit/File_Iterator<br />
sudo pear uninstall phpunit/PHP_Timer<br />
sudo pear uninstall phpunit/PHPUnit_MockObject<br />
sudo pear uninstall phpunit/Text_Template<br />
sudo pear uninstall phpunit/PHPUnit_Selenium<br />
sudo pear uninstall pear.symfony-project.com/YAML</p>
<p>2) Install version 3.5.15<br />
sudo pear install pear.symfony-project.com/YAML-1.0.2<br />
sudo pear install phpunit/PHPUnit_Selenium-1.0.1<br />
sudo pear install phpunit/PHPUnit_MockObject-1.0.3<br />
sudo pear install phpunit/PHP_Timer-1.0.0<br />
sudo pear install phpunit/File_Iterator-1.2.3<br />
sudo pear install phpunit/PHP_CodeCoverage-1.0.2<br />
sudo pear install phpunit/DbUnit-1.0.3<br />
sudo pear install phpunit/PHPUnit-3.5.15</p>
<p>So far so good, that is I have not run into any problem so far after 2 days using this FIX.</p>
<p>Thanx for ZendCasts 1337!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnS</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-33194</link>
		<dc:creator>JohnS</dc:creator>
		<pubDate>Tue, 31 Jan 2012 11:52:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-33194</guid>
		<description>@Srivathsa

This is a known issue: http://framework.zend.com/issues/browse/ZF-11828

To quote Matthew Weier O&#039;Phinney:
&quot;... the problem is that PHPUnit has broken BC both from 3.4 to 3.5 and from 3.5 to 3.6.&quot;

I had the same problem. To resolve it, I had to modify some Zend Framework files:
- Zend/PHPUnit/Constraint/DomQuery.php
- Zend/PHPUnit/Constraint/Redirect.php
- Zend/PHPUnit/Constraint/ResponseHeader.php

Here is what I did in each of the above files:

public function evaluate($other, $assertType = null)
 changed to
public function evaluate($other, $assertType = null, $returnResult = FALSE)

public function fail($other, $description, $not = false)
 changed to
public function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)

Although this did enable the tests to work, the downside is I now need to remember to update those files for every project.</description>
		<content:encoded><![CDATA[<p>@Srivathsa</p>
<p>This is a known issue: <a href="http://framework.zend.com/issues/browse/ZF-11828" rel="nofollow">http://framework.zend.com/issues/browse/ZF-11828</a></p>
<p>To quote Matthew Weier O&#8217;Phinney:<br />
&#8220;&#8230; the problem is that PHPUnit has broken BC both from 3.4 to 3.5 and from 3.5 to 3.6.&#8221;</p>
<p>I had the same problem. To resolve it, I had to modify some Zend Framework files:<br />
- Zend/PHPUnit/Constraint/DomQuery.php<br />
- Zend/PHPUnit/Constraint/Redirect.php<br />
- Zend/PHPUnit/Constraint/ResponseHeader.php</p>
<p>Here is what I did in each of the above files:</p>
<p>public function evaluate($other, $assertType = null)<br />
 changed to<br />
public function evaluate($other, $assertType = null, $returnResult = FALSE)</p>
<p>public function fail($other, $description, $not = false)<br />
 changed to<br />
public function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)</p>
<p>Although this did enable the tests to work, the downside is I now need to remember to update those files for every project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ferF</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-32775</link>
		<dc:creator>ferF</dc:creator>
		<pubDate>Tue, 24 Jan 2012 15:38:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-32775</guid>
		<description>As I&#039;m just feeling my way in to the field of PHP/Zend based web development, this tutorial has taken my  understanding of the use of phpunit forward in a massive leap.

You have saved me so much time &amp; pain with your excellent tutorial.

Thank you so much,
F</description>
		<content:encoded><![CDATA[<p>As I&#8217;m just feeling my way in to the field of PHP/Zend based web development, this tutorial has taken my  understanding of the use of phpunit forward in a massive leap.</p>
<p>You have saved me so much time &amp; pain with your excellent tutorial.</p>
<p>Thank you so much,<br />
F</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shemeee m ali</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-28078</link>
		<dc:creator>shemeee m ali</dc:creator>
		<pubDate>Tue, 13 Dec 2011 09:25:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-28078</guid>
		<description>Great tutorail, Thank you :-)</description>
		<content:encoded><![CDATA[<p>Great tutorail, Thank you <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srivathsa</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-27369</link>
		<dc:creator>Srivathsa</dc:creator>
		<pubDate>Mon, 05 Dec 2011 17:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-27369</guid>
		<description>I downloaded the source code and tried running it on windows using xampp. My phpunit version is 3.6.4. I get this error when i type
phpunit --configuration phpunit.xml

C:\xampp\htdocs\testsample\tests&gt;phpunit --configuration phpunit.xml
PHPUnit 3.6.4 by Sebastian Bergmann.

Configuration read from C:\xampp\htdocs\testsample\tests\phpunit.xml

←[31;1mE←[0m←[31;1mE←[0m..

Time: 0 seconds, Memory: 10.00Mb

There were 2 errors:

1) IndexControllerTest::testIndexWithMessageAction
Declaration of Zend_Test_PHPUnit_Constraint_DomQuery::evaluate() should be compatible with that of PHPUnit_Framework_Constraint::evaluate()

C:\xampp\htdocs\hive\library\Zend\Test\PHPUnit\Constraint\DomQuery.php:40
C:\xampp\htdocs\hive\library\Zend\Test\PHPUnit\ControllerTestCase.php:512
C:\xampp\htdocs\testsample\tests\application\controllers\IndexControllerTest.php
:14
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:925
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:787
C:\xampp\php\PEAR\PHPUnit\Framework\TestResult.php:649
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:734
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:772
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:745
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:705
C:\xampp\php\PEAR\PHPUnit\TextUI\TestRunner.php:325
C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:187
C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:125
C:\xampp\php\phpunit:44

2) IndexControllerTest::testIndexNoMessageAction
Declaration of Zend_Test_PHPUnit_Constraint_ResponseHeader::evaluate() should be
 compatible with that of PHPUnit_Framework_Constraint::evaluate()

C:\xampp\htdocs\hive\library\Zend\Test\PHPUnit\Constraint\ResponseHeader.php:400

C:\xampp\htdocs\hive\library\Zend\Test\PHPUnit\ControllerTestCase.php:769
C:\xampp\htdocs\hive\library\Zend\Test\PHPUnit\ControllerTestCase.php:769
C:\xampp\htdocs\testsample\tests\application\controllers\IndexControllerTest.php
:22
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:925
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:787
C:\xampp\php\PEAR\PHPUnit\Framework\TestResult.php:649
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:734
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:772
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:745
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:705
C:\xampp\php\PEAR\PHPUnit\TextUI\TestRunner.php:325
C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:187
C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:125
C:\xampp\php\phpunit:44

←[37;41m←[2KFAILURES!
←[0m←[37;41m←[2KTests: 4, Assertions: 10, Errors: 2.
←[0m←[2K
Generating code coverage report, this may take a moment.</description>
		<content:encoded><![CDATA[<p>I downloaded the source code and tried running it on windows using xampp. My phpunit version is 3.6.4. I get this error when i type<br />
phpunit &#8211;configuration phpunit.xml</p>
<p>C:\xampp\htdocs\testsample\tests&gt;phpunit &#8211;configuration phpunit.xml<br />
PHPUnit 3.6.4 by Sebastian Bergmann.</p>
<p>Configuration read from C:\xampp\htdocs\testsample\tests\phpunit.xml</p>
<p>←[31;1mE←[0m←[31;1mE←[0m..</p>
<p>Time: 0 seconds, Memory: 10.00Mb</p>
<p>There were 2 errors:</p>
<p>1) IndexControllerTest::testIndexWithMessageAction<br />
Declaration of Zend_Test_PHPUnit_Constraint_DomQuery::evaluate() should be compatible with that of PHPUnit_Framework_Constraint::evaluate()</p>
<p>C:\xampp\htdocs\hive\library\Zend\Test\PHPUnit\Constraint\DomQuery.php:40<br />
C:\xampp\htdocs\hive\library\Zend\Test\PHPUnit\ControllerTestCase.php:512<br />
C:\xampp\htdocs\testsample\tests\application\controllers\IndexControllerTest.php<br />
:14<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:925<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:787<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestResult.php:649<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:734<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:772<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:745<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:705<br />
C:\xampp\php\PEAR\PHPUnit\TextUI\TestRunner.php:325<br />
C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:187<br />
C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:125<br />
C:\xampp\php\phpunit:44</p>
<p>2) IndexControllerTest::testIndexNoMessageAction<br />
Declaration of Zend_Test_PHPUnit_Constraint_ResponseHeader::evaluate() should be<br />
 compatible with that of PHPUnit_Framework_Constraint::evaluate()</p>
<p>C:\xampp\htdocs\hive\library\Zend\Test\PHPUnit\Constraint\ResponseHeader.php:400</p>
<p>C:\xampp\htdocs\hive\library\Zend\Test\PHPUnit\ControllerTestCase.php:769<br />
C:\xampp\htdocs\hive\library\Zend\Test\PHPUnit\ControllerTestCase.php:769<br />
C:\xampp\htdocs\testsample\tests\application\controllers\IndexControllerTest.php<br />
:22<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:925<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:787<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestResult.php:649<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestCase.php:734<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:772<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:745<br />
C:\xampp\php\PEAR\PHPUnit\Framework\TestSuite.php:705<br />
C:\xampp\php\PEAR\PHPUnit\TextUI\TestRunner.php:325<br />
C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:187<br />
C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php:125<br />
C:\xampp\php\phpunit:44</p>
<p>←[37;41m←[2KFAILURES!<br />
←[0m←[37;41m←[2KTests: 4, Assertions: 10, Errors: 2.<br />
←[0m←[2K<br />
Generating code coverage report, this may take a moment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shehzad</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-26786</link>
		<dc:creator>Shehzad</dc:creator>
		<pubDate>Mon, 28 Nov 2011 15:05:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-26786</guid>
		<description>Yes it helped me.</description>
		<content:encoded><![CDATA[<p>Yes it helped me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-18158</link>
		<dc:creator>Anton</dc:creator>
		<pubDate>Thu, 05 May 2011 15:07:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-18158</guid>
		<description>@ratzip: I had the same error. You need to define one real test. I guess this worked in previous versions or PHPUnit, but now there must be a test case. You can grab a simple test from here for example: http://grover.open2space.com/content/unit-testing-zend-framework-111-and-phpunit#initialtest

Cheers, Anton</description>
		<content:encoded><![CDATA[<p>@ratzip: I had the same error. You need to define one real test. I guess this worked in previous versions or PHPUnit, but now there must be a test case. You can grab a simple test from here for example: <a href="http://grover.open2space.com/content/unit-testing-zend-framework-111-and-phpunit#initialtest" rel="nofollow">http://grover.open2space.com/content/unit-testing-zend-framework-111-and-phpunit#initialtest</a></p>
<p>Cheers, Anton</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ratzip</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-17749</link>
		<dc:creator>ratzip</dc:creator>
		<pubDate>Mon, 25 Apr 2011 11:38:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-17749</guid>
		<description>Hi Jon,

When I run the command &quot;phpunit --configuration phpunit.xml&quot;
I get the error: 
PHP Fatal error:  Uncaught exception &#039;PHPUnit_Framework_Exception&#039; with message
&#039;Neither &quot;Application Test Suite.php&quot; nor &quot;Application Test Suite.php&quot; could be
opened.&#039; in D:\PHP\php5\PEAR\PHPUnit\Util\Skeleton\Test.php:102
Stack trace:
#0 D:\PHP\php5\PEAR\PHPUnit\TextUI\Command.php(157): PHPUnit_Util_Skeleton_Test-
&gt;__construct(&#039;Application Tes...&#039;, &#039;&#039;)
#1 D:\PHP\php5\PEAR\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command-&gt;run
(Array, true)
#2 D:\PHP\php5\phpunit(53): PHPUnit_TextUI_Command::main()
#3 {main}
  thrown in D:\PHP\php5\PEAR\PHPUnit\Util\Skeleton\Test.php on line 102

It brothered me a lot, what is the problem and how could I fix it?</description>
		<content:encoded><![CDATA[<p>Hi Jon,</p>
<p>When I run the command &#8220;phpunit &#8211;configuration phpunit.xml&#8221;<br />
I get the error:<br />
PHP Fatal error:  Uncaught exception &#8216;PHPUnit_Framework_Exception&#8217; with message<br />
&#8216;Neither &#8220;Application Test Suite.php&#8221; nor &#8220;Application Test Suite.php&#8221; could be<br />
opened.&#8217; in D:\PHP\php5\PEAR\PHPUnit\Util\Skeleton\Test.php:102<br />
Stack trace:<br />
#0 D:\PHP\php5\PEAR\PHPUnit\TextUI\Command.php(157): PHPUnit_Util_Skeleton_Test-<br />
&gt;__construct(&#8216;Application Tes&#8230;&#8217;, &#8221;)<br />
#1 D:\PHP\php5\PEAR\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command-&gt;run<br />
(Array, true)<br />
#2 D:\PHP\php5\phpunit(53): PHPUnit_TextUI_Command::main()<br />
#3 {main}<br />
  thrown in D:\PHP\php5\PEAR\PHPUnit\Util\Skeleton\Test.php on line 102</p>
<p>It brothered me a lot, what is the problem and how could I fix it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: codef0rmer</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-16650</link>
		<dc:creator>codef0rmer</dc:creator>
		<pubDate>Tue, 29 Mar 2011 12:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-16650</guid>
		<description>I wanted to use Phactory to test part of the submit action source as given below: http://awesomescreenshot.com/050a0p2a6

Using Phactory, it is assured that the data is going into DB but the problem is in code coverage as some of the lines are still highlighted in red.

Is it necessary to consider the code coverage?</description>
		<content:encoded><![CDATA[<p>I wanted to use Phactory to test part of the submit action source as given below: <a href="http://awesomescreenshot.com/050a0p2a6" rel="nofollow">http://awesomescreenshot.com/050a0p2a6</a></p>
<p>Using Phactory, it is assured that the data is going into DB but the problem is in code coverage as some of the lines are still highlighted in red.</p>
<p>Is it necessary to consider the code coverage?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mr Man</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-15975</link>
		<dc:creator>Mr Man</dc:creator>
		<pubDate>Sun, 06 Mar 2011 12:25:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-15975</guid>
		<description>Hi - After completely avoiding unit testing for many years i can now see the benefits!

Thanks for a very clear tutorial :)

Cheers. G</description>
		<content:encoded><![CDATA[<p>Hi &#8211; After completely avoiding unit testing for many years i can now see the benefits!</p>
<p>Thanks for a very clear tutorial <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cheers. G</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-15362</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Sun, 13 Feb 2011 12:47:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-15362</guid>
		<description>Hi Jon,
At 18 mins and 53 seconds, did you stop for a break?

I noticed you added a require_once statement... Might be worth mentioning this above the video, because without it I get the error:

&quot;PHP Fatal error:  Class &#039;Zend_Test_PHPUnit_ControllerTestCase&#039; not found in /var/www/myapp/trunk/tests/application/ControllerTestCase.php on line 5&quot;

After adding:

require_once &#039;Zend/Test/PHPUnit/ControllerTestCase.php&#039;;

We&#039;re all set to go again...

:-)</description>
		<content:encoded><![CDATA[<p>Hi Jon,<br />
At 18 mins and 53 seconds, did you stop for a break?</p>
<p>I noticed you added a require_once statement&#8230; Might be worth mentioning this above the video, because without it I get the error:</p>
<p>&#8220;PHP Fatal error:  Class &#8216;Zend_Test_PHPUnit_ControllerTestCase&#8217; not found in /var/www/myapp/trunk/tests/application/ControllerTestCase.php on line 5&#8243;</p>
<p>After adding:</p>
<p>require_once &#8216;Zend/Test/PHPUnit/ControllerTestCase.php&#8217;;</p>
<p>We&#8217;re all set to go again&#8230;</p>
<p> <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wmario</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-14754</link>
		<dc:creator>wmario</dc:creator>
		<pubDate>Sun, 23 Jan 2011 21:16:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-14754</guid>
		<description>This was very helpful. This is the only tutorial on the web that actually works. I wasted 2 days with other tutorials. Zend Test documentation should include the link to this tutorial.

Thank!</description>
		<content:encoded><![CDATA[<p>This was very helpful. This is the only tutorial on the web that actually works. I wasted 2 days with other tutorials. Zend Test documentation should include the link to this tutorial.</p>
<p>Thank!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hanno</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-14603</link>
		<dc:creator>Hanno</dc:creator>
		<pubDate>Wed, 19 Jan 2011 03:47:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-14603</guid>
		<description>On my first comment:

Resolved by adding logging to the application.</description>
		<content:encoded><![CDATA[<p>On my first comment:</p>
<p>Resolved by adding logging to the application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hanno</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-14601</link>
		<dc:creator>Hanno</dc:creator>
		<pubDate>Wed, 19 Jan 2011 03:33:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-14601</guid>
		<description>Can I suggest to replace direct loading of Zend Application and other modules in the test classes with something like:

// Include path
set_include_path(
    &#039;.&#039;
    . PATH_SEPARATOR . BASE_PATH . &#039;/library&#039;
    . PATH_SEPARATOR . &#039;application/modules/admin/controllers&#039;
    . PATH_SEPARATOR . &#039;application/modules/default/controllers&#039;
    . PATH_SEPARATOR . get_include_path()
);

/** Zend_Application */
require_once &#039;Zend/Loader/Autoloader.php&#039;;
$loader = Zend_Loader_Autoloader::getInstance();
$loader-&gt;setFallbackAutoloader(true);
$loader-&gt;suppressNotFoundWarnings(false);
//$loader-&gt;pushAutoloader(&#039;helpers&#039;, &#039;helpers/&#039;, &#039;Helper&#039;);
//$loader-&gt;registerNamespace(&#039;App_&#039;);

then ALL the other require_once statements in all other files can be dropped - even the one for the ControllerTestCase.php
(Note the two commented rows how you can add your own namespace and load additional resources like helpers.)
(Note2: my controllers are in modules, so the include path has to be adapted depending on where the xxxControllerTestCase.php files are actually located, so autoloader can load them.

A lot more elegant and less error error prone, I would have thought.</description>
		<content:encoded><![CDATA[<p>Can I suggest to replace direct loading of Zend Application and other modules in the test classes with something like:</p>
<p>// Include path<br />
set_include_path(<br />
    &#8216;.&#8217;<br />
    . PATH_SEPARATOR . BASE_PATH . &#8216;/library&#8217;<br />
    . PATH_SEPARATOR . &#8216;application/modules/admin/controllers&#8217;<br />
    . PATH_SEPARATOR . &#8216;application/modules/default/controllers&#8217;<br />
    . PATH_SEPARATOR . get_include_path()<br />
);</p>
<p>/** Zend_Application */<br />
require_once &#8216;Zend/Loader/Autoloader.php&#8217;;<br />
$loader = Zend_Loader_Autoloader::getInstance();<br />
$loader-&gt;setFallbackAutoloader(true);<br />
$loader-&gt;suppressNotFoundWarnings(false);<br />
//$loader-&gt;pushAutoloader(&#8216;helpers&#8217;, &#8216;helpers/&#8217;, &#8216;Helper&#8217;);<br />
//$loader-&gt;registerNamespace(&#8216;App_&#8217;);</p>
<p>then ALL the other require_once statements in all other files can be dropped &#8211; even the one for the ControllerTestCase.php<br />
(Note the two commented rows how you can add your own namespace and load additional resources like helpers.)<br />
(Note2: my controllers are in modules, so the include path has to be adapted depending on where the xxxControllerTestCase.php files are actually located, so autoloader can load them.</p>
<p>A lot more elegant and less error error prone, I would have thought.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hanno</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-14599</link>
		<dc:creator>Hanno</dc:creator>
		<pubDate>Wed, 19 Jan 2011 02:03:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-14599</guid>
		<description>I assume he means the same issue I have: My page behaving different when called with phpunit or through the webpage. So I assume the bootstrapping is not quite complete, but have no idea and hint what the issue might be. All I get for this test:

class Admin_IndexControllerTest extends ControllerTestCase {

    public function testIndexAction() {
        $this-&gt;dispatch(&quot;/admin/login/login&quot;);
        $this-&gt;assertController(&quot;login&quot;);
        $this-&gt;assertAction(&quot;login&quot;);
        $this-&gt;assertResponseCode(200);
    }
}

is the following output:

&gt;phpunit
PHPUnit 3.5.9 by Sebastian Bergmann.

F

Time: 3 seconds, Memory: 18.00Mb

There was 1 failure:

1) IndexControllerTest::testIndexAction
Failed asserting last controller used  was &quot;login&quot;

C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Test\PHPUnit\C
ontrollerTestCase.php:997
C:\Users\Hanno\Documents\chillifire\trunk\tests\application\modules\admin\contro
llers\IndexControllerTest.php:7

←[37;41m←[2KFAILURES!
←[0m←[37;41m←[2KTests: 1, Assertions: 1, Failures: 1.
←[0m←[2K
Generating code coverage report, this may take a moment.


So I have no idea what is going on here based on the test output. Is there any way we can see the actual error that lead to the call of the error page by the dispatcher?</description>
		<content:encoded><![CDATA[<p>I assume he means the same issue I have: My page behaving different when called with phpunit or through the webpage. So I assume the bootstrapping is not quite complete, but have no idea and hint what the issue might be. All I get for this test:</p>
<p>class Admin_IndexControllerTest extends ControllerTestCase {</p>
<p>    public function testIndexAction() {<br />
        $this-&gt;dispatch(&#8220;/admin/login/login&#8221;);<br />
        $this-&gt;assertController(&#8220;login&#8221;);<br />
        $this-&gt;assertAction(&#8220;login&#8221;);<br />
        $this-&gt;assertResponseCode(200);<br />
    }<br />
}</p>
<p>is the following output:</p>
<p>&gt;phpunit<br />
PHPUnit 3.5.9 by Sebastian Bergmann.</p>
<p>F</p>
<p>Time: 3 seconds, Memory: 18.00Mb</p>
<p>There was 1 failure:</p>
<p>1) IndexControllerTest::testIndexAction<br />
Failed asserting last controller used  was &#8220;login&#8221;</p>
<p>C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Test\PHPUnit\C<br />
ontrollerTestCase.php:997<br />
C:\Users\Hanno\Documents\chillifire\trunk\tests\application\modules\admin\contro<br />
llers\IndexControllerTest.php:7</p>
<p>←[37;41m←[2KFAILURES!<br />
←[0m←[37;41m←[2KTests: 1, Assertions: 1, Failures: 1.<br />
←[0m←[2K<br />
Generating code coverage report, this may take a moment.</p>
<p>So I have no idea what is going on here based on the test output. Is there any way we can see the actual error that lead to the call of the error page by the dispatcher?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kartik</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-14597</link>
		<dc:creator>kartik</dc:creator>
		<pubDate>Tue, 18 Jan 2011 23:25:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-14597</guid>
		<description>Found a temp solution...

add the following line to phpunit.xml
under phpunit-&gt;filter-&gt;whitelist-&gt;exclude

../application/scripts/
 still looking for a better solution...

kartik</description>
		<content:encoded><![CDATA[<p>Found a temp solution&#8230;</p>
<p>add the following line to phpunit.xml<br />
under phpunit-&gt;filter-&gt;whitelist-&gt;exclude</p>
<p>../application/scripts/<br />
 still looking for a better solution&#8230;</p>
<p>kartik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kartik</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-14596</link>
		<dc:creator>kartik</dc:creator>
		<pubDate>Tue, 18 Jan 2011 23:18:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-14596</guid>
		<description>Hi jon 
I was following your tutorials on PHPUnit and I seem to have run up against a unique problem. Every time I run phpunit (or --configuration phpunit.xml) I seem to automatically run the doctrine CLI too. I am currently trying to trace the problem but I just wanted to ask in case anyone else has run across a similar problem.
please let me know if you have a solution.
kartik</description>
		<content:encoded><![CDATA[<p>Hi jon<br />
I was following your tutorials on PHPUnit and I seem to have run up against a unique problem. Every time I run phpunit (or &#8211;configuration phpunit.xml) I seem to automatically run the doctrine CLI too. I am currently trying to trace the problem but I just wanted to ask in case anyone else has run across a similar problem.<br />
please let me know if you have a solution.<br />
kartik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-14575</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 17 Jan 2011 20:44:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-14575</guid>
		<description>@deerwan, what do you mean a &quot;real error message&quot; ?</description>
		<content:encoded><![CDATA[<p>@deerwan, what do you mean a &#8220;real error message&#8221; ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deerawan</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-14211</link>
		<dc:creator>deerawan</dc:creator>
		<pubDate>Tue, 04 Jan 2011 08:20:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-14211</guid>
		<description>How to display real error message instead just this &quot;failed asserting last controller used  was &quot;?</description>
		<content:encoded><![CDATA[<p>How to display real error message instead just this &#8220;failed asserting last controller used  was &#8220;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeffery Shipman</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-13293</link>
		<dc:creator>Jeffery Shipman</dc:creator>
		<pubDate>Fri, 10 Dec 2010 15:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-13293</guid>
		<description>Does xdebug always take some much memory 4096m and time to run?  Or am I not configuring is right.  I am using
MAMP (PHP 5.3)
Mac OS 10.6.5
Processor 2 x 2.66 GHz 6-Core Intel Xeon
Memory 8 GB 1333 MHz

Thanks</description>
		<content:encoded><![CDATA[<p>Does xdebug always take some much memory 4096m and time to run?  Or am I not configuring is right.  I am using<br />
MAMP (PHP 5.3)<br />
Mac OS 10.6.5<br />
Processor 2 x 2.66 GHz 6-Core Intel Xeon<br />
Memory 8 GB 1333 MHz</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Running PHPUnit + Zend Framework in different environments &#124; MySQLTalk.com</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-11159</link>
		<dc:creator>Running PHPUnit + Zend Framework in different environments &#124; MySQLTalk.com</dc:creator>
		<pubDate>Fri, 15 Oct 2010 08:49:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-11159</guid>
		<description>[...] Before going any further, make sure you check out a basic tutorial on Zend Framework and PHPUnit. For example: http://weierophinney.net/matthew/archives/190-Setting-up-your-Zend_Test-test-suites.html or http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Before going any further, make sure you check out a basic tutorial on Zend Framework and PHPUnit. For example: <a href="http://weierophinney.net/matthew/archives/190-Setting-up-your-Zend_Test-test-suites.html" rel="nofollow">http://weierophinney.net/matthew/archives/190-Setting-up-your-Zend_Test-test-suites.html</a> or <a href="http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/" rel="nofollow">http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AndreH</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-10361</link>
		<dc:creator>AndreH</dc:creator>
		<pubDate>Mon, 13 Sep 2010 13:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-10361</guid>
		<description>Brilliant thanks! 

I was hassling with a few tutorials since they did not work 
with the current release of PHPUnit 3.4.15  i.c.w.  Zend Framework 1.10.8. 

But your source code works perfectly. Now i can finally start Unit testing my Controller Actions within my projects.</description>
		<content:encoded><![CDATA[<p>Brilliant thanks! </p>
<p>I was hassling with a few tutorials since they did not work<br />
with the current release of PHPUnit 3.4.15  i.c.w.  Zend Framework 1.10.8. </p>
<p>But your source code works perfectly. Now i can finally start Unit testing my Controller Actions within my projects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel Herzog</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-9516</link>
		<dc:creator>Samuel Herzog</dc:creator>
		<pubDate>Mon, 16 Aug 2010 19:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-9516</guid>
		<description>if you change into the directory with the phpunit.xml (usually [project]/tests) and simply run `phpunit` it detects the phpunit.xml and uses the settings. just define the log options like in the video.
if this doesn&#039;t work for you try
`phpunit --coverage-html &quot;./log/report&quot; --testdox-html &quot;./log/testdox.html&quot;`

a detailed description of how to invoke phpunit can be found here:
http://www.phpunit.de/manual/current/en/textui.html</description>
		<content:encoded><![CDATA[<p>if you change into the directory with the phpunit.xml (usually [project]/tests) and simply run `phpunit` it detects the phpunit.xml and uses the settings. just define the log options like in the video.<br />
if this doesn&#8217;t work for you try<br />
`phpunit &#8211;coverage-html &#8220;./log/report&#8221; &#8211;testdox-html &#8220;./log/testdox.html&#8221;`</p>
<p>a detailed description of how to invoke phpunit can be found here:<br />
<a href="http://www.phpunit.de/manual/current/en/textui.html" rel="nofollow">http://www.phpunit.de/manual/current/en/textui.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiran</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-9506</link>
		<dc:creator>Kiran</dc:creator>
		<pubDate>Mon, 16 Aug 2010 12:50:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-9506</guid>
		<description>We are not getting log folder in Testing-&gt;tests. we are using windows prompt. So can you say the commands for how to create the log folder in tests...Can you help me.........</description>
		<content:encoded><![CDATA[<p>We are not getting log folder in Testing-&gt;tests. we are using windows prompt. So can you say the commands for how to create the log folder in tests&#8230;Can you help me&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samet Çubukcu</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-8173</link>
		<dc:creator>Samet Çubukcu</dc:creator>
		<pubDate>Sun, 27 Jun 2010 19:59:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-8173</guid>
		<description>Thanks for video. It&#039;s good tutorial.</description>
		<content:encoded><![CDATA[<p>Thanks for video. It&#8217;s good tutorial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-7656</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Thu, 03 Jun 2010 09:59:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-7656</guid>
		<description>Okay, I found the problem.
It&#039;s a little more complicated, short version:
One resource plugin fired an exception, the exception tried to access a resource which wasn&#039;t loaded at that time. That caused an exception which said the resource isn&#039;t loaded yet.

Maybe this will help someone.</description>
		<content:encoded><![CDATA[<p>Okay, I found the problem.<br />
It&#8217;s a little more complicated, short version:<br />
One resource plugin fired an exception, the exception tried to access a resource which wasn&#8217;t loaded at that time. That caused an exception which said the resource isn&#8217;t loaded yet.</p>
<p>Maybe this will help someone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-7655</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Thu, 03 Jun 2010 09:28:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-7655</guid>
		<description>Hey!

@Küpper: ran into the same problem, make sure your application.ini/configuration is loaded. I&#039;m using modules, but probably this will help you nonetheless.

I&#039;ve also problems with application resources. The plugin files are loaded (tested with a simple echo in that file), but their init method isn&#039;t executed, therefore I&#039;m not able to use the plugins. I&#039;ve already made sure that my application.ini is loaded and contains the necessary configurations for that plugin.
Any help would be appreciated.</description>
		<content:encoded><![CDATA[<p>Hey!</p>
<p>@Küpper: ran into the same problem, make sure your application.ini/configuration is loaded. I&#8217;m using modules, but probably this will help you nonetheless.</p>
<p>I&#8217;ve also problems with application resources. The plugin files are loaded (tested with a simple echo in that file), but their init method isn&#8217;t executed, therefore I&#8217;m not able to use the plugins. I&#8217;ve already made sure that my application.ini is loaded and contains the necessary configurations for that plugin.<br />
Any help would be appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Küpper</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-7504</link>
		<dc:creator>Küpper</dc:creator>
		<pubDate>Tue, 25 May 2010 14:30:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-7504</guid>
		<description>Hey Jon,

Man, I&#039;m having the same problema as Mike up there....and my structure is almost like yours.
This is it:
“Zend_Controller_Exception: No default module defined for this application”
Cmon, i&#039;m not even using moules! lol

It happens by the time when my test function calls dispatch.

Any idea?

Thanks man!</description>
		<content:encoded><![CDATA[<p>Hey Jon,</p>
<p>Man, I&#8217;m having the same problema as Mike up there&#8230;.and my structure is almost like yours.<br />
This is it:<br />
“Zend_Controller_Exception: No default module defined for this application”<br />
Cmon, i&#8217;m not even using moules! lol</p>
<p>It happens by the time when my test function calls dispatch.</p>
<p>Any idea?</p>
<p>Thanks man!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: j</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-7237</link>
		<dc:creator>j</dc:creator>
		<pubDate>Mon, 10 May 2010 21:30:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-7237</guid>
		<description>This is great, however, I&#039;ve ran into an issue when using resource plugins in Zend_Application, eg:

resources.cachemanager.database.frontend.name								= Core
resources.cachemanager.database.frontend.options.caching					= true
resources.cachemanager.database.frontend.options.lifetime					= 300
resources.cachemanager.database.frontend.options.automatic_serialization	= true
resources.cachemanager.database.backend.name								= File
resources.cachemanager.database.backend.options.cache_dir					= APPLICATION_ROOT &quot;/data/cache&quot;

It does not appear as if the resource plugins are being loaded because in my model that I am testing, I receive the following:

Fatal error: Call to a member function getResource() on a non-object in /path/to/my/app/application/models/MyModel.php on line 34

The line throwing the error is in the Model&#039;s constructor when instantiating the cache from the resource plugin:

$this-&gt;cache 	= Zend_Controller_Front::getInstance()-&gt;getParam(&#039;bootstrap&#039;)-&gt;getResource(&#039;CacheManager&#039;)-&gt;getCache(&#039;database&#039;);

Any ideas on how to set up tests with Resource Plugins?</description>
		<content:encoded><![CDATA[<p>This is great, however, I&#8217;ve ran into an issue when using resource plugins in Zend_Application, eg:</p>
<p>resources.cachemanager.database.frontend.name								= Core<br />
resources.cachemanager.database.frontend.options.caching					= true<br />
resources.cachemanager.database.frontend.options.lifetime					= 300<br />
resources.cachemanager.database.frontend.options.automatic_serialization	= true<br />
resources.cachemanager.database.backend.name								= File<br />
resources.cachemanager.database.backend.options.cache_dir					= APPLICATION_ROOT &#8220;/data/cache&#8221;</p>
<p>It does not appear as if the resource plugins are being loaded because in my model that I am testing, I receive the following:</p>
<p>Fatal error: Call to a member function getResource() on a non-object in /path/to/my/app/application/models/MyModel.php on line 34</p>
<p>The line throwing the error is in the Model&#8217;s constructor when instantiating the cache from the resource plugin:</p>
<p>$this-&gt;cache 	= Zend_Controller_Front::getInstance()-&gt;getParam(&#8216;bootstrap&#8217;)-&gt;getResource(&#8216;CacheManager&#8217;)-&gt;getCache(&#8216;database&#8217;);</p>
<p>Any ideas on how to set up tests with Resource Plugins?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-7150</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Tue, 04 May 2010 07:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-7150</guid>
		<description>@Karthik I was having that problem. The thing was that I has two php.ini files, one for apache (used when we are in a web context) and the other inside the php folder (user when we are running in command line mode). I realiced the php.ini I have to edit was the second in order to get code coverage.</description>
		<content:encoded><![CDATA[<p>@Karthik I was having that problem. The thing was that I has two php.ini files, one for apache (used when we are in a web context) and the other inside the php folder (user when we are running in command line mode). I realiced the php.ini I have to edit was the second in order to get code coverage.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: karthik</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-6313</link>
		<dc:creator>karthik</dc:creator>
		<pubDate>Thu, 25 Mar 2010 07:54:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-6313</guid>
		<description>Hi,

Code coverage is not generated. I have downloaded xdebug and configured php.ini file, but still code coverage is not generated. What could be the reason.
Please help.

Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Code coverage is not generated. I have downloaded xdebug and configured php.ini file, but still code coverage is not generated. What could be the reason.<br />
Please help.</p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Crawford</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-6310</link>
		<dc:creator>Joseph Crawford</dc:creator>
		<pubDate>Wed, 24 Mar 2010 19:01:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-6310</guid>
		<description>Jon,

Thank you very much for this video.  It enabled me to implement testing of my ZF app and my external libraries.  While I cannot do the testing directly in Zend Studio I am satisfied with the ability to test my controllers/models, etc.

Thanks Again!</description>
		<content:encoded><![CDATA[<p>Jon,</p>
<p>Thank you very much for this video.  It enabled me to implement testing of my ZF app and my external libraries.  While I cannot do the testing directly in Zend Studio I am satisfied with the ability to test my controllers/models, etc.</p>
<p>Thanks Again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Crawford</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-6247</link>
		<dc:creator>Joseph Crawford</dc:creator>
		<pubDate>Sun, 21 Mar 2010 13:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-6247</guid>
		<description>Jon,

I was not specifically talking about Zend_Test.  You can use PHPUnit with Zend Studio and the Zend Framework without using Zend_Test.  I have had the unit testing *kinda* working in Zend Studio I believe you just have to follow a specific method.</description>
		<content:encoded><![CDATA[<p>Jon,</p>
<p>I was not specifically talking about Zend_Test.  You can use PHPUnit with Zend Studio and the Zend Framework without using Zend_Test.  I have had the unit testing *kinda* working in Zend Studio I believe you just have to follow a specific method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-6242</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Sun, 21 Mar 2010 10:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-6242</guid>
		<description>Hi Joseph,

to be honest, I gave up on getting Zend_Test to work with Zend Studio 6 months ago and haven&#039;t looked at it since. I prefer NetBeans&#039; implementation however I ultimately find myself back at the command line at the end of the day. I think we&#039;ll need another year or two to see the IDE&#039;s provide a complete TDD workflow for developers that&#039;s smooth. You should still be able to test your Controller plugins, just initialize an instance of Zend_Controller (if needed) and inject the object your testing inside. I would also suggest reviewing how the Controller plugins that come out of the box are unit tested and see what can be done for your own library.</description>
		<content:encoded><![CDATA[<p>Hi Joseph,</p>
<p>to be honest, I gave up on getting Zend_Test to work with Zend Studio 6 months ago and haven&#8217;t looked at it since. I prefer NetBeans&#8217; implementation however I ultimately find myself back at the command line at the end of the day. I think we&#8217;ll need another year or two to see the IDE&#8217;s provide a complete TDD workflow for developers that&#8217;s smooth. You should still be able to test your Controller plugins, just initialize an instance of Zend_Controller (if needed) and inject the object your testing inside. I would also suggest reviewing how the Controller plugins that come out of the box are unit tested and see what can be done for your own library.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-6241</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Sun, 21 Mar 2010 10:47:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-6241</guid>
		<description>Hi Peter,

I&#039;ll be revisiting the Unit Testing stuff again, especially since MAMP no longer comes with phpunit out of the box. Thanks for the feedback!</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>I&#8217;ll be revisiting the Unit Testing stuff again, especially since MAMP no longer comes with phpunit out of the box. Thanks for the feedback!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Urda</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-6174</link>
		<dc:creator>Peter Urda</dc:creator>
		<pubDate>Thu, 18 Mar 2010 17:33:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-6174</guid>
		<description>Except this walkthrough doesn&#039;t match the source, doesn&#039;t work right with *.16 of phpunit, and refuses to call in my StatsTest model (die statement isn&#039;t triggered for a check)

This really needs to be re-done, and actually have the source made in the video be the source online. Doesn&#039;t work? Fix it in the video, don&#039;t upload different source code. 

For an abstract idea such as this, having everything 1:1 is necessary, when the video != source code posted, users like myself just can&#039;t get anything to work.</description>
		<content:encoded><![CDATA[<p>Except this walkthrough doesn&#8217;t match the source, doesn&#8217;t work right with *.16 of phpunit, and refuses to call in my StatsTest model (die statement isn&#8217;t triggered for a check)</p>
<p>This really needs to be re-done, and actually have the source made in the video be the source online. Doesn&#8217;t work? Fix it in the video, don&#8217;t upload different source code. </p>
<p>For an abstract idea such as this, having everything 1:1 is necessary, when the video != source code posted, users like myself just can&#8217;t get anything to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Crawford</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-6167</link>
		<dc:creator>Joseph Crawford</dc:creator>
		<pubDate>Thu, 18 Mar 2010 13:12:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-6167</guid>
		<description>Thank you very much for the time you spent on this video.  This does leave one question though and that is how do you test your library files?

For instance if you have

/library/Namespace/Controller/Plugin/MyFront.php

How could you then run tests against things like this?  We have a library that consists of many files and I would not want to leave them out of the testing phase.

I have gotten this testing to work outside of Zend Studio but it would be really nice if I could get it to work inside Zend Studio.  I also have not followed your video to get the tests working.  I plan to go through your video again today or tomorrow and try to implement this and see if it will work for us.  I am sure that if we can test our libraries as well as the controllers and models we would be able to adopt this practice.</description>
		<content:encoded><![CDATA[<p>Thank you very much for the time you spent on this video.  This does leave one question though and that is how do you test your library files?</p>
<p>For instance if you have</p>
<p>/library/Namespace/Controller/Plugin/MyFront.php</p>
<p>How could you then run tests against things like this?  We have a library that consists of many files and I would not want to leave them out of the testing phase.</p>
<p>I have gotten this testing to work outside of Zend Studio but it would be really nice if I could get it to work inside Zend Studio.  I also have not followed your video to get the tests working.  I plan to go through your video again today or tomorrow and try to implement this and see if it will work for us.  I am sure that if we can test our libraries as well as the controllers and models we would be able to adopt this practice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mysticav</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-6161</link>
		<dc:creator>mysticav</dc:creator>
		<pubDate>Thu, 18 Mar 2010 03:49:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-6161</guid>
		<description>Errata:
AS you can see, in minute 18:56, Jon included the line:
require_once ‘Zend/Test/PHPUnit/ControllerTestCase.php’;

But he never mentioned that on the video.
This was giving me a headache until I watched closely and found this issue.

Thanks Jon.</description>
		<content:encoded><![CDATA[<p>Errata:<br />
AS you can see, in minute 18:56, Jon included the line:<br />
require_once ‘Zend/Test/PHPUnit/ControllerTestCase.php’;</p>
<p>But he never mentioned that on the video.<br />
This was giving me a headache until I watched closely and found this issue.</p>
<p>Thanks Jon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mysticav</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-6159</link>
		<dc:creator>mysticav</dc:creator>
		<pubDate>Thu, 18 Mar 2010 03:31:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-6159</guid>
		<description>I&#039;m using Zend Server CE ver 5 (php 5.3.1) on Windows.

As you know, it comnes with Zend Debugger. 
For some reason I ignore, phpunit was not working until I removed Zend Debugger and installed Xdebug: 
xdebug-2.0.5-5.3-nts-Win32-VC9-x86.dll

I tried xdebug 2.1 with no luck.</description>
		<content:encoded><![CDATA[<p>I&#8217;m using Zend Server CE ver 5 (php 5.3.1) on Windows.</p>
<p>As you know, it comnes with Zend Debugger.<br />
For some reason I ignore, phpunit was not working until I removed Zend Debugger and installed Xdebug:<br />
xdebug-2.0.5-5.3-nts-Win32-VC9-x86.dll</p>
<p>I tried xdebug 2.1 with no luck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wal_j</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-5880</link>
		<dc:creator>Wal_j</dc:creator>
		<pubDate>Sat, 06 Mar 2010 14:43:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-5880</guid>
		<description>A follow up to the issues that I was having in my previous post.

My System
Zend Server CE 4.0.6
Windows XP

In tests/application/bootstrap.php
add 
require_once &#039;Zend/Test/PHPUnit/ControllerTestCase.php&#039;;

Im not sure how Jon is loading this but somehow the include path to Zend doesn&#039;t seem to work when running tests on the CLI. (maybe its just me?)

Code Coverage Reports
---------------------
In order to get the code coverage reports working, I needed to disable zend debugger (I did this via the Zend Server (http://localhost/ZendServer))
Then install xdebug. and worked through the following page which worked 1st time. (I ommitted Step 3 as i didnt have that line in the debugger.ini file
http://forums.zend.com/viewtopic.php?f=8&amp;t=553

I Hope this saves somebody some time, as i have been working on this for way---tooooo--long.
Alex</description>
		<content:encoded><![CDATA[<p>A follow up to the issues that I was having in my previous post.</p>
<p>My System<br />
Zend Server CE 4.0.6<br />
Windows XP</p>
<p>In tests/application/bootstrap.php<br />
add<br />
require_once &#8216;Zend/Test/PHPUnit/ControllerTestCase.php&#8217;;</p>
<p>Im not sure how Jon is loading this but somehow the include path to Zend doesn&#8217;t seem to work when running tests on the CLI. (maybe its just me?)</p>
<p>Code Coverage Reports<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
In order to get the code coverage reports working, I needed to disable zend debugger (I did this via the Zend Server (<a href="http://localhost/ZendServer" rel="nofollow">http://localhost/ZendServer</a>))<br />
Then install xdebug. and worked through the following page which worked 1st time. (I ommitted Step 3 as i didnt have that line in the debugger.ini file<br />
<a href="http://forums.zend.com/viewtopic.php?f=8&#038;t=553" rel="nofollow">http://forums.zend.com/viewtopic.php?f=8&#038;t=553</a></p>
<p>I Hope this saves somebody some time, as i have been working on this for way&#8212;tooooo&#8211;long.<br />
Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wal_j</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-5834</link>
		<dc:creator>Wal_j</dc:creator>
		<pubDate>Thu, 04 Mar 2010 16:15:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-5834</guid>
		<description>Re: Ty Barho

I am having the same issue.  It looks like PHPUnit is failing because it can not require the correct resources from Zend_Test_PHPUnit_ControllerTestCase.

It is requiring PHPUnit/Framework/TestCase.php among others.

Because my PHPUnit is installed in:
C:\Program Files\Zend\ZendServer\bin\PEAR\PHPUnit
The required classes are not on the include path.

I have messed about moving the files and changing the include_path but i have not yet got it to work.

PHPUnit is not outputting any Error messages to the CLI (is this Correct?)  It just fails to require the needed resource and returns back to the prompt.
Alex</description>
		<content:encoded><![CDATA[<p>Re: Ty Barho</p>
<p>I am having the same issue.  It looks like PHPUnit is failing because it can not require the correct resources from Zend_Test_PHPUnit_ControllerTestCase.</p>
<p>It is requiring PHPUnit/Framework/TestCase.php among others.</p>
<p>Because my PHPUnit is installed in:<br />
C:\Program Files\Zend\ZendServer\bin\PEAR\PHPUnit<br />
The required classes are not on the include path.</p>
<p>I have messed about moving the files and changing the include_path but i have not yet got it to work.</p>
<p>PHPUnit is not outputting any Error messages to the CLI (is this Correct?)  It just fails to require the needed resource and returns back to the prompt.<br />
Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ty Barho</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-5544</link>
		<dc:creator>Ty Barho</dc:creator>
		<pubDate>Sun, 21 Feb 2010 22:59:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-5544</guid>
		<description>So I&#039;ve been trying to follow with this, and I&#039;ve gotten to about minute 21:35.  phpunit seems to be running fine, but when i enter in $phpunit --configuration phpunit.xml, it&#039;s doing nothing.  it&#039;s just giving me a new command line.

if i add die(&#039;i&#039;m the bootstrap&#039;) to tests/application/bootstrap.php at the beginning, phpunit is still outputting &#039;i&#039;m the bootstrap&#039;

if i insert that die in any of the other methods that have been created to this point in the video, i get nothing as well, so it&#039;s making it really hard to figure out what&#039;s happening.

any suggestions?</description>
		<content:encoded><![CDATA[<p>So I&#8217;ve been trying to follow with this, and I&#8217;ve gotten to about minute 21:35.  phpunit seems to be running fine, but when i enter in $phpunit &#8211;configuration phpunit.xml, it&#8217;s doing nothing.  it&#8217;s just giving me a new command line.</p>
<p>if i add die(&#8216;i&#8217;m the bootstrap&#8217;) to tests/application/bootstrap.php at the beginning, phpunit is still outputting &#8216;i&#8217;m the bootstrap&#8217;</p>
<p>if i insert that die in any of the other methods that have been created to this point in the video, i get nothing as well, so it&#8217;s making it really hard to figure out what&#8217;s happening.</p>
<p>any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: W</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-5312</link>
		<dc:creator>W</dc:creator>
		<pubDate>Tue, 09 Feb 2010 11:45:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-5312</guid>
		<description>Thank you very much! Very helpful!! Thanks to your info I managed to add a phpunit to my current project all together with code coverage reports!</description>
		<content:encoded><![CDATA[<p>Thank you very much! Very helpful!! Thanks to your info I managed to add a phpunit to my current project all together with code coverage reports!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-4616</link>
		<dc:creator>James</dc:creator>
		<pubDate>Wed, 13 Jan 2010 03:02:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-4616</guid>
		<description>@paul (late but for others who find this via Google as I did)

There doesn&#039;t seem to be a solution for using Xdebug with Zend Server CE 4.0.5. The &quot;official&quot; response is:

&quot;The PHP project only supports VC6 and VC9, and not VC8. Therefore I only 
have VC6 and VC9 versions for Xdebug. &quot;
Source: http://xdebug.org/archives/xdebug-general/1634.html</description>
		<content:encoded><![CDATA[<p>@paul (late but for others who find this via Google as I did)</p>
<p>There doesn&#8217;t seem to be a solution for using Xdebug with Zend Server CE 4.0.5. The &#8220;official&#8221; response is:</p>
<p>&#8220;The PHP project only supports VC6 and VC9, and not VC8. Therefore I only<br />
have VC6 and VC9 versions for Xdebug. &#8221;<br />
Source: <a href="http://xdebug.org/archives/xdebug-general/1634.html" rel="nofollow">http://xdebug.org/archives/xdebug-general/1634.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-4579</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Mon, 11 Jan 2010 17:36:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-4579</guid>
		<description>Hi Mike,
I would double-check your application.ini file.</description>
		<content:encoded><![CDATA[<p>Hi Mike,<br />
I would double-check your application.ini file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-4571</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 11 Jan 2010 07:11:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-4571</guid>
		<description>Hi, 

My architecture is quite similar than yours, my problem is after adding that line of code in my ControllerTestCase.php file : 
&quot;$this-&gt;application-&gt;bootstrap();&quot;
I still get the following error : &quot;Zend_Controller_Exception: No default module defined for this application&quot;
except for this simple test :&quot;$this-&gt;assertTrue(TRUE);&quot;

Any idea ? 

Thanks,</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>My architecture is quite similar than yours, my problem is after adding that line of code in my ControllerTestCase.php file :<br />
&#8220;$this-&gt;application-&gt;bootstrap();&#8221;<br />
I still get the following error : &#8220;Zend_Controller_Exception: No default module defined for this application&#8221;<br />
except for this simple test :&#8221;$this-&gt;assertTrue(TRUE);&#8221;</p>
<p>Any idea ? </p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osdave</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-3594</link>
		<dc:creator>osdave</dc:creator>
		<pubDate>Fri, 27 Nov 2009 13:29:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-3594</guid>
		<description>sorry for double posting, i forgot to check the followup notify checkbox...</description>
		<content:encoded><![CDATA[<p>sorry for double posting, i forgot to check the followup notify checkbox&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osdave</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-3593</link>
		<dc:creator>osdave</dc:creator>
		<pubDate>Fri, 27 Nov 2009 13:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-3593</guid>
		<description>for melissa (and maybe others), i had a similar issue and got answered in stackoverflow: http://stackoverflow.com/questions/1808148/unit-testing-phpunit-how-to-login
i hope it helps.
cheers</description>
		<content:encoded><![CDATA[<p>for melissa (and maybe others), i had a similar issue and got answered in stackoverflow: <a href="http://stackoverflow.com/questions/1808148/unit-testing-phpunit-how-to-login" rel="nofollow">http://stackoverflow.com/questions/1808148/unit-testing-phpunit-how-to-login</a><br />
i hope it helps.<br />
cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: melissa</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-3281</link>
		<dc:creator>melissa</dc:creator>
		<pubDate>Sat, 07 Nov 2009 22:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-3281</guid>
		<description>i want to start using phpunit for my web app and  i am grateful for this video showing the basic steps. most of the pages in my app require the visitor to login . when i try to run any code via phpunit that is dispatching to the login page, i get error = &#039;Zend_session is not marked as readable&#039;.
 here is my test method code:
public function testLoginActionPost()
{
$this-&gt;getRequest()
-&gt;setmethod(&#039;POST&#039;);
$this-&gt;dispatch(&quot;/auth/login&quot;);
$this-&gt;assertController(&quot;auth&quot;);
$this-&gt;assertAction(&quot;login&quot;);
$this-&gt;assertResponseCode(200);
}

and here is the error:
There was 1 error:

1) IndexControllerTest::testLoginActionPost
Zend_Session_Exception: Zend_Session is not marked as readable.

library\Zend\Session\Abstract.php:86
library\Zend\Session\Namespace.php:391
library\Zend\Auth\Storage\Session.php:117
library\Zend\Auth.php:133
application\views\helpers\BuildMenu.php:13
library\Zend\View\Abstract.php:342
application\layouts\layout.phtml:11
library\Zend\View.php:108
library\Zend\View\Abstract.php:833
library\Zend\Layout.php:793
library\Zend\Layout\Controller\Plugin\Layout.php:142
library\Zend\Controller\Plugin\Broker.php:331
library\Zend\Controller\Front.php:957
library\Zend\Test\PHPUnit\ControllerTestCase.php:190
tests\application\controllers\IndexControllerTest.php:45

if i follow the code in my BuildMenu.php, it is merely truying to check
if the user is logged in, when the exception is thrown:
    	$auth = Zend_Auth::getInstance();
    	if ($auth-&gt;hasIdentity()) {   &lt;--------- this line causes Zend_Session_Exception: Zend_Session is not marked as readable.
    	to be thrown.</description>
		<content:encoded><![CDATA[<p>i want to start using phpunit for my web app and  i am grateful for this video showing the basic steps. most of the pages in my app require the visitor to login . when i try to run any code via phpunit that is dispatching to the login page, i get error = &#8216;Zend_session is not marked as readable&#8217;.<br />
 here is my test method code:<br />
public function testLoginActionPost()<br />
{<br />
$this-&gt;getRequest()<br />
-&gt;setmethod(&#8216;POST&#8217;);<br />
$this-&gt;dispatch(&#8220;/auth/login&#8221;);<br />
$this-&gt;assertController(&#8220;auth&#8221;);<br />
$this-&gt;assertAction(&#8220;login&#8221;);<br />
$this-&gt;assertResponseCode(200);<br />
}</p>
<p>and here is the error:<br />
There was 1 error:</p>
<p>1) IndexControllerTest::testLoginActionPost<br />
Zend_Session_Exception: Zend_Session is not marked as readable.</p>
<p>library\Zend\Session\Abstract.php:86<br />
library\Zend\Session\Namespace.php:391<br />
library\Zend\Auth\Storage\Session.php:117<br />
library\Zend\Auth.php:133<br />
application\views\helpers\BuildMenu.php:13<br />
library\Zend\View\Abstract.php:342<br />
application\layouts\layout.phtml:11<br />
library\Zend\View.php:108<br />
library\Zend\View\Abstract.php:833<br />
library\Zend\Layout.php:793<br />
library\Zend\Layout\Controller\Plugin\Layout.php:142<br />
library\Zend\Controller\Plugin\Broker.php:331<br />
library\Zend\Controller\Front.php:957<br />
library\Zend\Test\PHPUnit\ControllerTestCase.php:190<br />
tests\application\controllers\IndexControllerTest.php:45</p>
<p>if i follow the code in my BuildMenu.php, it is merely truying to check<br />
if the user is logged in, when the exception is thrown:<br />
    	$auth = Zend_Auth::getInstance();<br />
    	if ($auth-&gt;hasIdentity()) {   &lt;&#8212;&#8212;&#8212; this line causes Zend_Session_Exception: Zend_Session is not marked as readable.<br />
    	to be thrown.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michiel Thalen</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-3055</link>
		<dc:creator>Michiel Thalen</dc:creator>
		<pubDate>Tue, 20 Oct 2009 00:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-3055</guid>
		<description>Do you know how to run this via zend studio? It seems it only can execute phpunit files (not using the configuration).
If i run phpunit from the commandline it needs xdebug for code coverage, and that disables the debug function.</description>
		<content:encoded><![CDATA[<p>Do you know how to run this via zend studio? It seems it only can execute phpunit files (not using the configuration).<br />
If i run phpunit from the commandline it needs xdebug for code coverage, and that disables the debug function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Werby</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-2/#comment-3049</link>
		<dc:creator>Christopher Werby</dc:creator>
		<pubDate>Mon, 19 Oct 2009 03:02:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-3049</guid>
		<description>Hi Jon,

I&#039;ve checked and checked and I can&#039;t find phpunit within MAMP.  I just went through and upgraded MAMP to the latest 1.8.3 and went to the directory you use: /Applications/MAMP/bin/php5/bin  While the other 6 files that you show in your video are there, phpunit is not.  (The other six are pear, peardev, pecl, php, php-config, phpize)

Are you sure you didn&#039;t install it separately first?  Is it possible that it was in an older version of MAMP and has subsequently been removed?</description>
		<content:encoded><![CDATA[<p>Hi Jon,</p>
<p>I&#8217;ve checked and checked and I can&#8217;t find phpunit within MAMP.  I just went through and upgraded MAMP to the latest 1.8.3 and went to the directory you use: /Applications/MAMP/bin/php5/bin  While the other 6 files that you show in your video are there, phpunit is not.  (The other six are pear, peardev, pecl, php, php-config, phpize)</p>
<p>Are you sure you didn&#8217;t install it separately first?  Is it possible that it was in an older version of MAMP and has subsequently been removed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Enrique</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-3000</link>
		<dc:creator>Enrique</dc:creator>
		<pubDate>Thu, 15 Oct 2009 09:56:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-3000</guid>
		<description>Hi,

Just wanted to ask for a little help here..

Following the tutorial, I managed to work my way until the creation of ControllerTestCase. When I started testing on the command line( I&#039;m using Windows Vista, Zend Framework ), the prompt seemed to be pausing for a second then it it displays nothing. I tried running the bootstrap.php( almost similar to the bootstrap file demonstrated here ) by php and saw that error is:

PHP Fatal Error: Cannot redeclare class phpunit_framework_testcase on line 117.

I guess that&#039;s why the phpunit does not display anything -- the ControllerTestCase that I use( the one extending the Zend_Test_PHPUnit_ControllerTestCase ) fails.

I&#039;ve been searching for the same issue over the internet to no avail.

Thanks for you help..</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Just wanted to ask for a little help here..</p>
<p>Following the tutorial, I managed to work my way until the creation of ControllerTestCase. When I started testing on the command line( I&#8217;m using Windows Vista, Zend Framework ), the prompt seemed to be pausing for a second then it it displays nothing. I tried running the bootstrap.php( almost similar to the bootstrap file demonstrated here ) by php and saw that error is:</p>
<p>PHP Fatal Error: Cannot redeclare class phpunit_framework_testcase on line 117.</p>
<p>I guess that&#8217;s why the phpunit does not display anything &#8212; the ControllerTestCase that I use( the one extending the Zend_Test_PHPUnit_ControllerTestCase ) fails.</p>
<p>I&#8217;ve been searching for the same issue over the internet to no avail.</p>
<p>Thanks for you help..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Jung</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2940</link>
		<dc:creator>David Jung</dc:creator>
		<pubDate>Fri, 09 Oct 2009 20:58:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2940</guid>
		<description>I had some trouble to debug why my logging was filing after the first unit test was run.

I was grabbing my logger instance from Zend_Registry.

Well, it seems that PHPUnit resets all global variables and class static variables between tests, hence the static variable Zend_Registry uses to reference its singelton instance was being destroyed.

To work-around that I had to add a declaration to my TestCase class:

protected $backupStaticAttributesBlacklist = array(
      &#039;Zend_Registry&#039; =&gt; array(&#039;_registry&#039;)
    );

That ensures that values set in the Zend registry are available to all unit tests.
(obviously have to be careful if the code you&#039;re testing interacts with the registry in any non-trivial way.  Mine doesn&#039;t).</description>
		<content:encoded><![CDATA[<p>I had some trouble to debug why my logging was filing after the first unit test was run.</p>
<p>I was grabbing my logger instance from Zend_Registry.</p>
<p>Well, it seems that PHPUnit resets all global variables and class static variables between tests, hence the static variable Zend_Registry uses to reference its singelton instance was being destroyed.</p>
<p>To work-around that I had to add a declaration to my TestCase class:</p>
<p>protected $backupStaticAttributesBlacklist = array(<br />
      &#8216;Zend_Registry&#8217; =&gt; array(&#8216;_registry&#8217;)<br />
    );</p>
<p>That ensures that values set in the Zend registry are available to all unit tests.<br />
(obviously have to be careful if the code you&#8217;re testing interacts with the registry in any non-trivial way.  Mine doesn&#8217;t).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2892</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Sat, 03 Oct 2009 21:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2892</guid>
		<description>oh sorry, and I am using Zend Server for php 5.3</description>
		<content:encoded><![CDATA[<p>oh sorry, and I am using Zend Server for php 5.3</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2891</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Sat, 03 Oct 2009 21:05:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2891</guid>
		<description>Hi, great screencast.
I know that I need XDebug for Code Coverage. I downloaded this http://www.xdebug.org/files/php_xdebug-2.0.5-5.3-vc9-nts.dll and I am using Zend Server 4.0.5 for Windows Vista (32bit). I activated XDebug in php.ini and disabled Zend Optimizer+, Zend Debugger.
For testing I used the code frome screencast (downloaded).

Now my problem: phpunit says that I am using a wrong version of XDebug (VC9 instead of VC8), but there is no VC8 to download. And I can not find xdebug 2.1.0-dev for download, like in the screencast.

How can I solve the problem?</description>
		<content:encoded><![CDATA[<p>Hi, great screencast.<br />
I know that I need XDebug for Code Coverage. I downloaded this <a href="http://www.xdebug.org/files/php_xdebug-2.0.5-5.3-vc9-nts.dll" rel="nofollow">http://www.xdebug.org/files/php_xdebug-2.0.5-5.3-vc9-nts.dll</a> and I am using Zend Server 4.0.5 for Windows Vista (32bit). I activated XDebug in php.ini and disabled Zend Optimizer+, Zend Debugger.<br />
For testing I used the code frome screencast (downloaded).</p>
<p>Now my problem: phpunit says that I am using a wrong version of XDebug (VC9 instead of VC8), but there is no VC8 to download. And I can not find xdebug 2.1.0-dev for download, like in the screencast.</p>
<p>How can I solve the problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Purkhardt</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2839</link>
		<dc:creator>Karl Purkhardt</dc:creator>
		<pubDate>Tue, 29 Sep 2009 19:06:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2839</guid>
		<description>Hi, first of all, great screencast.  However I have a problem, when I run my tests phpunit always fails when I have 2 or more tests (1 test is fine).  I&#039;ve tracked this down to the $application-&gt;bootstrap() call, basically the 2nd call causes phpunit to &quot;break&quot;, but I get no output, just a single &quot;.&quot; and then the test ends (I don&#039;t even get the 1 test run etc. output).  Do you have any idea why this is?  If I limit the bootstrap() to only get called once then it works, but obviously I shouldn&#039;t have to as you didn&#039;t in your example.  Thanks Karl.</description>
		<content:encoded><![CDATA[<p>Hi, first of all, great screencast.  However I have a problem, when I run my tests phpunit always fails when I have 2 or more tests (1 test is fine).  I&#8217;ve tracked this down to the $application-&gt;bootstrap() call, basically the 2nd call causes phpunit to &#8220;break&#8221;, but I get no output, just a single &#8220;.&#8221; and then the test ends (I don&#8217;t even get the 1 test run etc. output).  Do you have any idea why this is?  If I limit the bootstrap() to only get called once then it works, but obviously I shouldn&#8217;t have to as you didn&#8217;t in your example.  Thanks Karl.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russ</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2768</link>
		<dc:creator>Russ</dc:creator>
		<pubDate>Wed, 23 Sep 2009 22:40:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2768</guid>
		<description>After running the sudo ln -s command, phpunit is not moved to my home directory. Any ideas?</description>
		<content:encoded><![CDATA[<p>After running the sudo ln -s command, phpunit is not moved to my home directory. Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2747</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Tue, 22 Sep 2009 20:26:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2747</guid>
		<description>thanks for mentioning this sudheer!</description>
		<content:encoded><![CDATA[<p>thanks for mentioning this sudheer!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sudheer</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2741</link>
		<dc:creator>Sudheer</dc:creator>
		<pubDate>Tue, 22 Sep 2009 16:34:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2741</guid>
		<description>Thanks for the screen cast. I figured with the help of fw-general ML, how to test models and library classes without extending Zend_Test_PHPUnit_ControllerTestCase.

Fix the session related testing issues:
In tests/bootstrap.php have this line of code

require_once &#039;Zend/Session.php&#039;;
Zend_Session::$_unitTestEnabled = true;


In the tests/bootstrap.php script initialize and bootstrap your application.

$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . &#039;/configs/application.ini&#039;
);
$application-&gt;bootstrap();

Note, we are not running the application, just bootstrapping. Your model classes can now extend PHPUnit_Framework_TestCase instead of Zend_Test_PHPUnit_ControllerTestCase.</description>
		<content:encoded><![CDATA[<p>Thanks for the screen cast. I figured with the help of fw-general ML, how to test models and library classes without extending Zend_Test_PHPUnit_ControllerTestCase.</p>
<p>Fix the session related testing issues:<br />
In tests/bootstrap.php have this line of code</p>
<p>require_once &#8216;Zend/Session.php&#8217;;<br />
Zend_Session::$_unitTestEnabled = true;</p>
<p>In the tests/bootstrap.php script initialize and bootstrap your application.</p>
<p>$application = new Zend_Application(<br />
    APPLICATION_ENV,<br />
    APPLICATION_PATH . &#8216;/configs/application.ini&#8217;<br />
);<br />
$application-&gt;bootstrap();</p>
<p>Note, we are not running the application, just bootstrapping. Your model classes can now extend PHPUnit_Framework_TestCase instead of Zend_Test_PHPUnit_ControllerTestCase.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sandor</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2737</link>
		<dc:creator>Sandor</dc:creator>
		<pubDate>Tue, 22 Sep 2009 09:43:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2737</guid>
		<description>Hi There,

for all who tries it with ZF 1.9.x and PHHUnit 3.3.17 or greater the following would help to solve some issues:
-&gt; asserting Xpath only accept valid xpath e.g.
   assertContentContains(&quot;id(&#039;message&#039;)&quot;,&quot;default&quot;) becomes
$this-&gt;assertXpathContentContains(&quot;//h2[@id=&#039;message&#039;]&quot;,&quot;default&quot; );

and somehow even xdebug is set the logging doesn&#039;t work on my mac

r. Sandor</description>
		<content:encoded><![CDATA[<p>Hi There,</p>
<p>for all who tries it with ZF 1.9.x and PHHUnit 3.3.17 or greater the following would help to solve some issues:<br />
-&gt; asserting Xpath only accept valid xpath e.g.<br />
   assertContentContains(&#8220;id(&#8216;message&#8217;)&#8221;,&#8221;default&#8221;) becomes<br />
$this-&gt;assertXpathContentContains(&#8220;//h2[@id='message']&#8220;,&#8221;default&#8221; );</p>
<p>and somehow even xdebug is set the logging doesn&#8217;t work on my mac</p>
<p>r. Sandor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Munday</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2693</link>
		<dc:creator>Ian Munday</dc:creator>
		<pubDate>Sat, 19 Sep 2009 17:23:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2693</guid>
		<description>My error was due to having the following at the top of my response:



As my document was not in fact valid XML, removing this solved my problem.

Also see http://www.nabble.com/PHPUnit-testing-generating-Zend_Dom_Exception-td25522644.html

Regards,

Ian</description>
		<content:encoded><![CDATA[<p>My error was due to having the following at the top of my response:</p>
<p>As my document was not in fact valid XML, removing this solved my problem.</p>
<p>Also see <a href="http://www.nabble.com/PHPUnit-testing-generating-Zend_Dom_Exception-td25522644.html" rel="nofollow">http://www.nabble.com/PHPUnit-testing-generating-Zend_Dom_Exception-td25522644.html</a></p>
<p>Regards,</p>
<p>Ian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Munday</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2691</link>
		<dc:creator>Ian Munday</dc:creator>
		<pubDate>Sat, 19 Sep 2009 15:24:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2691</guid>
		<description>Great video, but I&#039;m having the following problem:

I can use most assertion methods such as assertModule(), assertController(), assertAction() and assertResponseCode(), but when I try to use methods such as assertQueryContentContains() or assertXpathContentContains(), I get the following exception:

Zend_Dom_Exception: Error parsing document (type == docXml)

Has anyone else encountered this, or have clues as to how to fix?

Regards,

Ian</description>
		<content:encoded><![CDATA[<p>Great video, but I&#8217;m having the following problem:</p>
<p>I can use most assertion methods such as assertModule(), assertController(), assertAction() and assertResponseCode(), but when I try to use methods such as assertQueryContentContains() or assertXpathContentContains(), I get the following exception:</p>
<p>Zend_Dom_Exception: Error parsing document (type == docXml)</p>
<p>Has anyone else encountered this, or have clues as to how to fix?</p>
<p>Regards,</p>
<p>Ian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unit Tests &#124; Der ewige Anfänger</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2656</link>
		<dc:creator>Unit Tests &#124; Der ewige Anfänger</dc:creator>
		<pubDate>Fri, 18 Sep 2009 02:32:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2656</guid>
		<description>[...] Unit Testing width the Zend Framework &#8211; 3 Screencasts [...]</description>
		<content:encoded><![CDATA[<p>[...] Unit Testing width the Zend Framework &#8211; 3 Screencasts [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2571</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 15 Sep 2009 19:56:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2571</guid>
		<description>Loved the tutorial. I had a bit of trouble installing xdebug at first because I was using the latest version of zend server... however, once that was all taken care of, the video was extremely helpful. Thanks!!</description>
		<content:encoded><![CDATA[<p>Loved the tutorial. I had a bit of trouble installing xdebug at first because I was using the latest version of zend server&#8230; however, once that was all taken care of, the video was extremely helpful. Thanks!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2569</link>
		<dc:creator>Alexey</dc:creator>
		<pubDate>Tue, 15 Sep 2009 17:18:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2569</guid>
		<description>I tried to follow this video, but on windows.
I install phpunit and made a phpunit.xml file.
Then I executed phpunit --configuration phpunit.xml, but it displayed nothing.
Then I executed phpunit --bootstrap application\bootstrap.php and it displayed a die(...) message.
So, I understood, that phpunit ignored my phpunit.xml

Ok, then I started to change a bootstrap file, as I saw in video and executed phpunit --bootstrap application\bootstrap.php again.
But that moment it displaay nothing. But in video it displayed some information. (
I don&#039;t understand a phpunit behaviour on windows. ((</description>
		<content:encoded><![CDATA[<p>I tried to follow this video, but on windows.<br />
I install phpunit and made a phpunit.xml file.<br />
Then I executed phpunit &#8211;configuration phpunit.xml, but it displayed nothing.<br />
Then I executed phpunit &#8211;bootstrap application\bootstrap.php and it displayed a die(&#8230;) message.<br />
So, I understood, that phpunit ignored my phpunit.xml</p>
<p>Ok, then I started to change a bootstrap file, as I saw in video and executed phpunit &#8211;bootstrap application\bootstrap.php again.<br />
But that moment it displaay nothing. But in video it displayed some information. (<br />
I don&#8217;t understand a phpunit behaviour on windows. ((</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2419</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Fri, 04 Sep 2009 12:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2419</guid>
		<description>Hmm can somebody tell me what i did wrong i have mamp followed the tutorials..but when i type phpunit nothing happens i dont get to see the parameters..

Thanks for your answer!</description>
		<content:encoded><![CDATA[<p>Hmm can somebody tell me what i did wrong i have mamp followed the tutorials..but when i type phpunit nothing happens i dont get to see the parameters..</p>
<p>Thanks for your answer!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iceangel89</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2391</link>
		<dc:creator>iceangel89</dc:creator>
		<pubDate>Thu, 03 Sep 2009 02:10:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2391</guid>
		<description>i cant seem to get pear/phpunit working correctly on my windows 7. 

when i run &quot;pear&quot; i get &quot;syntax error, unexpected &#039;(&#039; in Unknown on line 14&quot; tho the help stuff comes out. 

when i run &quot;phpunit&quot;, i get &quot;&#039;&quot;&quot;C:\Program&#039; is not recognized as an internal or external command,
operable program or batch file.&quot; tho the tests run.</description>
		<content:encoded><![CDATA[<p>i cant seem to get pear/phpunit working correctly on my windows 7. </p>
<p>when i run &#8220;pear&#8221; i get &#8220;syntax error, unexpected &#8216;(&#8216; in Unknown on line 14&#8243; tho the help stuff comes out. </p>
<p>when i run &#8220;phpunit&#8221;, i get &#8220;&#8216;&#8221;"C:\Program&#8217; is not recognized as an internal or external command,<br />
operable program or batch file.&#8221; tho the tests run.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shashi</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2385</link>
		<dc:creator>shashi</dc:creator>
		<pubDate>Wed, 02 Sep 2009 23:01:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2385</guid>
		<description>Thanks Jon,

very informative !
U the man :)</description>
		<content:encoded><![CDATA[<p>Thanks Jon,</p>
<p>very informative !<br />
U the man <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2376</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Wed, 02 Sep 2009 12:17:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2376</guid>
		<description>hey iceangel89,

I wrote a mini tutorial about my setup on my blog — http://lebensold.net/development/unit-testing-within-the-netbeans-6-7-1-ui</description>
		<content:encoded><![CDATA[<p>hey iceangel89,</p>
<p>I wrote a mini tutorial about my setup on my blog — <a href="http://lebensold.net/development/unit-testing-within-the-netbeans-6-7-1-ui" rel="nofollow">http://lebensold.net/development/unit-testing-within-the-netbeans-6-7-1-ui</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iceangel89</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2373</link>
		<dc:creator>iceangel89</dc:creator>
		<pubDate>Wed, 02 Sep 2009 09:56:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2373</guid>
		<description>how was it that you set up unit testing for netbeans i am kind of lost ...</description>
		<content:encoded><![CDATA[<p>how was it that you set up unit testing for netbeans i am kind of lost &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alexander</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2357</link>
		<dc:creator>alexander</dc:creator>
		<pubDate>Tue, 01 Sep 2009 01:19:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2357</guid>
		<description>Now I have some kind of idea about unit testing! Thanks a lot!</description>
		<content:encoded><![CDATA[<p>Now I have some kind of idea about unit testing! Thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yiyi</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2264</link>
		<dc:creator>yiyi</dc:creator>
		<pubDate>Mon, 24 Aug 2009 17:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2264</guid>
		<description>this video is excellent!! i really grateful for your share,but i want to know! how can i download it? i am looking forward to your replying!</description>
		<content:encoded><![CDATA[<p>this video is excellent!! i really grateful for your share,but i want to know! how can i download it? i am looking forward to your replying!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zend Framework: estos son mis principios, si no te gustan tengo otros &#171; Olagato&#8217;s blog</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-2065</link>
		<dc:creator>Zend Framework: estos son mis principios, si no te gustan tengo otros &#171; Olagato&#8217;s blog</dc:creator>
		<pubDate>Sun, 09 Aug 2009 19:53:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-2065</guid>
		<description>[...] un primer TestUnitario. Ref: &#8220;Unit testing with ZF&#8221; by [...]</description>
		<content:encoded><![CDATA[<p>[...] un primer TestUnitario. Ref: &#8220;Unit testing with ZF&#8221; by [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eKini: Web Developer Blog &#187; Slides/Article to read and screencasts to watch.</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1951</link>
		<dc:creator>eKini: Web Developer Blog &#187; Slides/Article to read and screencasts to watch.</dc:creator>
		<pubDate>Thu, 30 Jul 2009 09:36:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1951</guid>
		<description>[...] A screencast from Zendcasts.com about Unit Testing - http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/ [...]</description>
		<content:encoded><![CDATA[<p>[...] A screencast from Zendcasts.com about Unit Testing &#8211; <a href="http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/" rel="nofollow">http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaime</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1920</link>
		<dc:creator>Jaime</dc:creator>
		<pubDate>Mon, 27 Jul 2009 08:41:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1920</guid>
		<description>Great!!
Thanks jon</description>
		<content:encoded><![CDATA[<p>Great!!<br />
Thanks jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1908</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sun, 26 Jul 2009 11:17:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1908</guid>
		<description>@john:
Thanks for the links. PHPUnit and Xdebug is now running. But i have a problem. I wanted to test it and created a standart project with zend_tool and copied the tests folder from your example. 
But when i now run phpunit it seems that it does nothing. No code coverage, now test and so on.

But if i try it with your example it works.</description>
		<content:encoded><![CDATA[<p>@john:<br />
Thanks for the links. PHPUnit and Xdebug is now running. But i have a problem. I wanted to test it and created a standart project with zend_tool and copied the tests folder from your example.<br />
But when i now run phpunit it seems that it does nothing. No code coverage, now test and so on.</p>
<p>But if i try it with your example it works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Kennedy</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1875</link>
		<dc:creator>Dave Kennedy</dc:creator>
		<pubDate>Thu, 23 Jul 2009 14:11:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1875</guid>
		<description>You need xdebug for the coverage reports</description>
		<content:encoded><![CDATA[<p>You need xdebug for the coverage reports</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kanaran</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1869</link>
		<dc:creator>Kanaran</dc:creator>
		<pubDate>Thu, 23 Jul 2009 08:59:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1869</guid>
		<description>I tried unit testing on my vista machine and i didn&#039;t get the coverage report. testdox is there, but no coverage. phpunit version is 3.3.9.
i did the test as vista-admin. no error messages - no report :(

any hints?


p.s.: sorry for my english, i&#039;m not a nativ speaker.</description>
		<content:encoded><![CDATA[<p>I tried unit testing on my vista machine and i didn&#8217;t get the coverage report. testdox is there, but no coverage. phpunit version is 3.3.9.<br />
i did the test as vista-admin. no error messages &#8211; no report <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>any hints?</p>
<p>p.s.: sorry for my english, i&#8217;m not a nativ speaker.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1864</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Thu, 23 Jul 2009 01:35:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1864</guid>
		<description>I&#039;m new to testing this way with the Zend Framework. Excellent point about the boostrap.php file being run by the phpunit XML config file. So I put this line in my appBootstrap() function in the ControllerTestCase class:

Zend_Application_Module_Autoloader(array(&#039;namespace&#039; =&gt; &#039;&#039;, &#039;basePath&#039;  =&gt; APPLICATION_PATH));

Now I&#039;m trying to figure out how to get my default database adapter set up.</description>
		<content:encoded><![CDATA[<p>I&#8217;m new to testing this way with the Zend Framework. Excellent point about the boostrap.php file being run by the phpunit XML config file. So I put this line in my appBootstrap() function in the ControllerTestCase class:</p>
<p>Zend_Application_Module_Autoloader(array(&#8216;namespace&#8217; =&gt; &#8221;, &#8216;basePath&#8217;  =&gt; APPLICATION_PATH));</p>
<p>Now I&#8217;m trying to figure out how to get my default database adapter set up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1862</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Wed, 22 Jul 2009 23:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1862</guid>
		<description>Hi Lee,

bootstrap.php if a procedurally-written file that is run via the phpunit.xml file. The Bootstrap.php file is specifically part of the Zend framework&#039;s bootstrap. This includes configuration and other business that is uniform across the test and dev/test instances of your application.</description>
		<content:encoded><![CDATA[<p>Hi Lee,</p>
<p>bootstrap.php if a procedurally-written file that is run via the phpunit.xml file. The Bootstrap.php file is specifically part of the Zend framework&#8217;s bootstrap. This includes configuration and other business that is uniform across the test and dev/test instances of your application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1861</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Wed, 22 Jul 2009 22:14:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1861</guid>
		<description>I am having trouble getting my classes to auto load. Also, why is the application Bootstrap.php a class but the Zend_Test bootstrap.php is not a class. In my application Bootstrap.php file I have a function named _initAutoload() like this: 

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

  protected function _initAutoload() {  
    $moduleLoader = new Zend_Application_Module_Autoloader(array(&#039;namespace&#039; =&gt; &#039;&#039;, &#039;basePath&#039;  =&gt; APPLICATION_PATH)); 
  }

}

But since my Zend_Test bootstrap.php file is not a class, I&#039;m not sure how to get the autoloading to work. 

Great screencast!</description>
		<content:encoded><![CDATA[<p>I am having trouble getting my classes to auto load. Also, why is the application Bootstrap.php a class but the Zend_Test bootstrap.php is not a class. In my application Bootstrap.php file I have a function named _initAutoload() like this: </p>
<p>class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {</p>
<p>  protected function _initAutoload() {<br />
    $moduleLoader = new Zend_Application_Module_Autoloader(array(&#8216;namespace&#8217; =&gt; &#8221;, &#8216;basePath&#8217;  =&gt; APPLICATION_PATH));<br />
  }</p>
<p>}</p>
<p>But since my Zend_Test bootstrap.php file is not a class, I&#8217;m not sure how to get the autoloading to work. </p>
<p>Great screencast!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1857</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Wed, 22 Jul 2009 16:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1857</guid>
		<description>Hi Alex,

I think things have changed since I downloaded my copy of MAMP. Here are two articles about grabbing phpunit with MAMP:
http://mark-kirby.co.uk/2009/installing-phpunit-with-mamp/

http://www.typeoneerror.com/installing-phpunit-with-mamp/

hope that helps,
-
Jon</description>
		<content:encoded><![CDATA[<p>Hi Alex,</p>
<p>I think things have changed since I downloaded my copy of MAMP. Here are two articles about grabbing phpunit with MAMP:<br />
<a href="http://mark-kirby.co.uk/2009/installing-phpunit-with-mamp/" rel="nofollow">http://mark-kirby.co.uk/2009/installing-phpunit-with-mamp/</a></p>
<p><a href="http://www.typeoneerror.com/installing-phpunit-with-mamp/" rel="nofollow">http://www.typeoneerror.com/installing-phpunit-with-mamp/</a></p>
<p>hope that helps,<br />
-<br />
Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1852</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 22 Jul 2009 09:42:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1852</guid>
		<description>Hi question.
I downloaded MAMP but i don&#039;t have phpunit in that directory. How can i get it?</description>
		<content:encoded><![CDATA[<p>Hi question.<br />
I downloaded MAMP but i don&#8217;t have phpunit in that directory. How can i get it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Юнит тестирование приложений на Zend Framework&#8217;е</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1700</link>
		<dc:creator>Юнит тестирование приложений на Zend Framework&#8217;е</dc:creator>
		<pubDate>Wed, 15 Jul 2009 06:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1700</guid>
		<description>[...] Скрин-каст: Unit Testing with the Zend Framework with Zend_Test and PHPUnit [...]</description>
		<content:encoded><![CDATA[<p>[...] Скрин-каст: Unit Testing with the Zend Framework with Zend_Test and PHPUnit [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phpunit bootstrap not working in windows &#171; Cormac&#8217;s php blog</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1538</link>
		<dc:creator>phpunit bootstrap not working in windows &#171; Cormac&#8217;s php blog</dc:creator>
		<pubDate>Wed, 08 Jul 2009 15:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1538</guid>
		<description>[...] bootstrap not working in&#160;windows July 8, 2009   While following this tutorial and trying to set up phpunit to work with the Zend Framework, I couldn&#8217;t for the life of me [...]</description>
		<content:encoded><![CDATA[<p>[...] bootstrap not working in&nbsp;windows July 8, 2009   While following this tutorial and trying to set up phpunit to work with the Zend Framework, I couldn&#8217;t for the life of me [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1524</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Tue, 07 Jul 2009 13:38:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1524</guid>
		<description>Hi Martin,
ControllerTestCase is a bit of a misnomer since its not only a class that helps with setting up Zend_Test_* classes, but also helps you bootstrap your application and make it run with the same include paths etc... that you would expect if you were running the app in dev/staging/production environments. I could extend a class that would be similar that didn&#039;t have the ability to start the front controller however it would require a more complex design for my testing framework. As long as the developer is disciplined and doesn&#039;t run non Model-specific unit tests in StatsTest, I don&#039;t see a problem. What do you think?</description>
		<content:encoded><![CDATA[<p>Hi Martin,<br />
ControllerTestCase is a bit of a misnomer since its not only a class that helps with setting up Zend_Test_* classes, but also helps you bootstrap your application and make it run with the same include paths etc&#8230; that you would expect if you were running the app in dev/staging/production environments. I could extend a class that would be similar that didn&#8217;t have the ability to start the front controller however it would require a more complex design for my testing framework. As long as the developer is disciplined and doesn&#8217;t run non Model-specific unit tests in StatsTest, I don&#8217;t see a problem. What do you think?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1522</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Tue, 07 Jul 2009 10:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1522</guid>
		<description>Hi,

why is Model_StatsTest extending ControllerTestCase?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>why is Model_StatsTest extending ControllerTestCase?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: UJ</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1462</link>
		<dc:creator>UJ</dc:creator>
		<pubDate>Wed, 01 Jul 2009 12:04:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1462</guid>
		<description>Very helpfull. Thanks!</description>
		<content:encoded><![CDATA[<p>Very helpfull. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Devon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1448</link>
		<dc:creator>Joe Devon</dc:creator>
		<pubDate>Tue, 30 Jun 2009 09:18:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1448</guid>
		<description>Excellent screencast, Jon. Many thanks! It was very useful.</description>
		<content:encoded><![CDATA[<p>Excellent screencast, Jon. Many thanks! It was very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Kennedy</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1376</link>
		<dc:creator>Dave Kennedy</dc:creator>
		<pubDate>Thu, 25 Jun 2009 17:56:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1376</guid>
		<description>Thanks for the reply Jon, Model_ is loaded by convention, but not initializing a DB such as...

protected function _initDatabase()
	{
		$resource = $this-&gt;getPluginResource(&#039;db&#039;);
		$db = $resource-&gt;getDbAdapter();
        Zend_Db_Table_Abstract::setDefaultAdapter($db);


I had a look at Matthew&#039;s blog and frigged a similar method, only difference being in the setup  method of every test cases I call the applications bootstrap (not test bootstrap file that is created with Zend Tool)but suppose I could extend a class similar to what you have here.</description>
		<content:encoded><![CDATA[<p>Thanks for the reply Jon, Model_ is loaded by convention, but not initializing a DB such as&#8230;</p>
<p>protected function _initDatabase()<br />
	{<br />
		$resource = $this-&gt;getPluginResource(&#8216;db&#8217;);<br />
		$db = $resource-&gt;getDbAdapter();<br />
        Zend_Db_Table_Abstract::setDefaultAdapter($db);</p>
<p>I had a look at Matthew&#8217;s blog and frigged a similar method, only difference being in the setup  method of every test cases I call the applications bootstrap (not test bootstrap file that is created with Zend Tool)but suppose I could extend a class similar to what you have here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1375</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Thu, 25 Jun 2009 17:09:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1375</guid>
		<description>Ah... you might need to explicitly include it in the array which is passed into set_include_paths.. since Model_ might not be loaded by convention through the unit tests...</description>
		<content:encoded><![CDATA[<p>Ah&#8230; you might need to explicitly include it in the array which is passed into set_include_paths.. since Model_ might not be loaded by convention through the unit tests&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Kennedy</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1374</link>
		<dc:creator>Dave Kennedy</dc:creator>
		<pubDate>Thu, 25 Jun 2009 17:06:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1374</guid>
		<description>Hi Jon, thanks for getting back to me, yeah I have a test DB and it correctly setup under [testing : production] in my application.ini. 

phpunit comes back with &quot;Fatal error: Class &#039;Zend_Db_Table_Abstract&#039; not found&quot;

I kinda expected it would as autoloading is setup in my applications bootstrap (not test bootstrap) using 

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoload()
    {
        $autoloader = new Zend_Application_Module_Autoloader(array(
            &#039;namespace&#039; =&gt; &#039;&#039;,
            &#039;basePath&#039;  =&gt; dirname(__FILE__),
        ));
        return $autoloader;
    }
}
, I just was not clear how to do this under the setup you described.

Thanks in advance

Dave</description>
		<content:encoded><![CDATA[<p>Hi Jon, thanks for getting back to me, yeah I have a test DB and it correctly setup under [testing : production] in my application.ini. </p>
<p>phpunit comes back with &#8220;Fatal error: Class &#8216;Zend_Db_Table_Abstract&#8217; not found&#8221;</p>
<p>I kinda expected it would as autoloading is setup in my applications bootstrap (not test bootstrap) using </p>
<p>class Bootstrap extends Zend_Application_Bootstrap_Bootstrap<br />
{<br />
protected function _initAutoload()<br />
    {<br />
        $autoloader = new Zend_Application_Module_Autoloader(array(<br />
            &#8216;namespace&#8217; =&gt; &#8221;,<br />
            &#8216;basePath&#8217;  =&gt; dirname(__FILE__),<br />
        ));<br />
        return $autoloader;<br />
    }<br />
}<br />
, I just was not clear how to do this under the setup you described.</p>
<p>Thanks in advance</p>
<p>Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1373</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Thu, 25 Jun 2009 05:21:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1373</guid>
		<description>Hi Dave,
do you have a test database? or at least a database setup in your application.ini file under the &#039;testing&#039; heading? That might be the only problem. Can you paste your exception information?</description>
		<content:encoded><![CDATA[<p>Hi Dave,<br />
do you have a test database? or at least a database setup in your application.ini file under the &#8216;testing&#8217; heading? That might be the only problem. Can you paste your exception information?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Kennedy</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1360</link>
		<dc:creator>Dave Kennedy</dc:creator>
		<pubDate>Tue, 23 Jun 2009 13:55:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1360</guid>
		<description>Hi Jon,
Excellent website which has been a excellent resource for me. I&#039;m struggling a bit testing models which extend Zend_Db_Table_Abstract. I know this is all to do with the bootstrapping. 

The application can access, store data etc. to the DB but it appears I have not to have been able to set up the DB correctly for my test suite.

Could you provide any assistance?</description>
		<content:encoded><![CDATA[<p>Hi Jon,<br />
Excellent website which has been a excellent resource for me. I&#8217;m struggling a bit testing models which extend Zend_Db_Table_Abstract. I know this is all to do with the bootstrapping. </p>
<p>The application can access, store data etc. to the DB but it appears I have not to have been able to set up the DB correctly for my test suite.</p>
<p>Could you provide any assistance?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1348</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Mon, 22 Jun 2009 06:34:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1348</guid>
		<description>Hi Jon,
I found out that my xdebug was not installed :-D Now everything is working fine :-)</description>
		<content:encoded><![CDATA[<p>Hi Jon,<br />
I found out that my xdebug was not installed <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />  Now everything is working fine <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1328</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Fri, 19 Jun 2009 22:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1328</guid>
		<description>Hi Tom,

its possible that the phpunit.xml was mis-configured... another possibility is that you may not have permissions set to write to those particular folders. Hope that helps,
-
Jon</description>
		<content:encoded><![CDATA[<p>Hi Tom,</p>
<p>its possible that the phpunit.xml was mis-configured&#8230; another possibility is that you may not have permissions set to write to those particular folders. Hope that helps,<br />
-<br />
Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1319</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Fri, 19 Jun 2009 09:45:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1319</guid>
		<description>Hi Jon,
I have found your website very helpful. I tried this tutorial and everything worked fina but when I run the test the test-coverage report is not created. I tried to use your source code but the same problem occure. Do you have any clue what could be possibly wrong? Thx</description>
		<content:encoded><![CDATA[<p>Hi Jon,<br />
I have found your website very helpful. I tried this tutorial and everything worked fina but when I run the test the test-coverage report is not created. I tried to use your source code but the same problem occure. Do you have any clue what could be possibly wrong? Thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1293</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Wed, 17 Jun 2009 18:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1293</guid>
		<description>RE:Comment 6

Worked it out... my code was misleading me ;-)</description>
		<content:encoded><![CDATA[<p>RE:Comment 6</p>
<p>Worked it out&#8230; my code was misleading me <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1292</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Wed, 17 Jun 2009 18:09:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1292</guid>
		<description>Just wondering how you would go about testing a AsyncController like the one in a previous video? I can&#039;t seem to figure it out.

Thanks for the videos. Keep it up.</description>
		<content:encoded><![CDATA[<p>Just wondering how you would go about testing a AsyncController like the one in a previous video? I can&#8217;t seem to figure it out.</p>
<p>Thanks for the videos. Keep it up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Lebensold</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1287</link>
		<dc:creator>Jon Lebensold</dc:creator>
		<pubDate>Wed, 17 Jun 2009 12:32:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1287</guid>
		<description>Silone! 

That&#039;s a much cleaner way of doing the assertion. Thank you!</description>
		<content:encoded><![CDATA[<p>Silone! </p>
<p>That&#8217;s a much cleaner way of doing the assertion. Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silone</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1283</link>
		<dc:creator>Silone</dc:creator>
		<pubDate>Wed, 17 Jun 2009 04:51:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1283</guid>
		<description>Very nice video Jon, you are the greatest :)

Just wanted to drop a question,
in your model test you write

foreach ( $this-&gt;stats-&gt;getCountries() as $country )
{
  if ( $country == $defaultCountry )
    $this-&gt;assertEquals($country, $defaultCountry);
}

the thing is, i don&#039;t like this if, it already answers the assertion and therefore &quot;overiterates&quot; the testing.
Maybe i just didn&#039;t get the point of this test, if so tell me i&#039;m eager to hear your reasoning :)

Just to finish my thought:

$isCountryAdded = in_array($defaultCountry, $this-&gt;stats-&gt;getCountries());
$this-&gt;assertTrue($isCountryAdded);

This seems to be an way to dismiss the if and therefore always have the assertion take place.

Greetings and many many thanks again for all the help with the setup &amp; configuration of phpunit :))</description>
		<content:encoded><![CDATA[<p>Very nice video Jon, you are the greatest <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Just wanted to drop a question,<br />
in your model test you write</p>
<p>foreach ( $this-&gt;stats-&gt;getCountries() as $country )<br />
{<br />
  if ( $country == $defaultCountry )<br />
    $this-&gt;assertEquals($country, $defaultCountry);<br />
}</p>
<p>the thing is, i don&#8217;t like this if, it already answers the assertion and therefore &#8220;overiterates&#8221; the testing.<br />
Maybe i just didn&#8217;t get the point of this test, if so tell me i&#8217;m eager to hear your reasoning <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Just to finish my thought:</p>
<p>$isCountryAdded = in_array($defaultCountry, $this-&gt;stats-&gt;getCountries());<br />
$this-&gt;assertTrue($isCountryAdded);</p>
<p>This seems to be an way to dismiss the if and therefore always have the assertion take place.</p>
<p>Greetings and many many thanks again for all the help with the setup &amp; configuration of phpunit <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1264</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Sun, 14 Jun 2009 12:18:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1264</guid>
		<description>Your website is fantastic.

If you need french help.. z-f.fr</description>
		<content:encoded><![CDATA[<p>Your website is fantastic.</p>
<p>If you need french help.. z-f.fr</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1257</link>
		<dc:creator>jon</dc:creator>
		<pubDate>Sat, 13 Jun 2009 00:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1257</guid>
		<description>Thanks for the feedback Juan :)

I think I covered that a couple videos ago (using Zend_Tool)... or are you referring to something else?</description>
		<content:encoded><![CDATA[<p>Thanks for the feedback Juan <img src='http://www.zendcasts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I think I covered that a couple videos ago (using Zend_Tool)&#8230; or are you referring to something else?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan Felipe Alvarez Saldarriaga</title>
		<link>http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend_test-and-phpunit/2009/06/comment-page-1/#comment-1248</link>
		<dc:creator>Juan Felipe Alvarez Saldarriaga</dc:creator>
		<pubDate>Fri, 12 Jun 2009 11:53:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.zendcasts.com/?p=209#comment-1248</guid>
		<description>Great video!, what about Zend_Application with modules bootstraping ?

Thx!</description>
		<content:encoded><![CDATA[<p>Great video!, what about Zend_Application with modules bootstraping ?</p>
<p>Thx!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

