<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Zendcasts Forum - ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
	<link rel="self" href="http://www.zendcasts.com/forum/feed/atom/topic/106/"/>
	<updated>2010-04-17T21:26:01Z</updated>
	<generator>PunBB</generator>
	<id>http://www.zendcasts.com/forum/topic/106/zc39-writing-doctrine-unit-tests-with-zendtest/</id>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/803/#p803"/>
			<content type="html"><![CDATA[<p>ridiculous indeed...</p>]]></content>
			<author>
				<name><![CDATA[Jon Lebensold]]></name>
				<uri>http://www.zendcasts.com/forum/user/3/</uri>
			</author>
			<updated>2010-04-17T21:26:01Z</updated>
			<id>http://www.zendcasts.com/forum/post/803/#p803</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/801/#p801"/>
			<content type="html"><![CDATA[<p>you&#039;re joking wright? and if not, do you know if there are ways to fix this besides renaming the models? tnx for ur time on this and your excellent screencasts <img src="http://www.zendcasts.com/forum/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>It seems like this is the issue, I&#039;ve created another table, generated the model for it and tested it successfully.<br />by the way, the new class name is: &#039;<strong>P</strong>roject&#039;</p>]]></content>
			<author>
				<name><![CDATA[yusufdestina]]></name>
				<uri>http://www.zendcasts.com/forum/user/192/</uri>
			</author>
			<updated>2010-04-16T17:11:59Z</updated>
			<id>http://www.zendcasts.com/forum/post/801/#p801</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/800/#p800"/>
			<content type="html"><![CDATA[<p>hey Yusuf,</p><p>I&#039;ve read several reports a silly bug where models that start with letters before &quot;D&quot; aren&#039;t loaded... I&#039;m not sure if that&#039;s your issue though...</p>]]></content>
			<author>
				<name><![CDATA[Jon Lebensold]]></name>
				<uri>http://www.zendcasts.com/forum/user/3/</uri>
			</author>
			<updated>2010-04-16T15:36:24Z</updated>
			<id>http://www.zendcasts.com/forum/post/800/#p800</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/799/#p799"/>
			<content type="html"><![CDATA[<p>in one of your first videos about zf and doctrine you had a models folder and then the models files and a Base directory with the generated classes for the models.</p><p>in the application.ini you defined some settings:<br /></p><div class="codebox"><pre><code>doctrine.generate_models_options.pearStyle = true
doctrine.generate_models_options.generateTableClasses = false
doctrine.generate_models_options.generateBaseClasses = true
doctrine.generate_models_options.baseClassPrefix = &quot;Base_&quot;
doctrine.generate_models_options.baseClassesDirectory =
doctrine.generate_models_options.classPrefixFiles = false
doctrine.generate_models_options.classPrefix = &quot;Model_&quot;</code></pre></div><p>If I try to integrate phpunit testing with the setup explained in previous tutorials and the one you provide in this video<br />example:<br /></p><div class="codebox"><pre><code>class ArticleTest extends Zend_Test_PHPUnit_ControllerTestCase {
.
.
.
public function testFindAll() {
        $article = new Model_Article();
        $obj = $article-&gt;findAll($this-&gt;lang);
        $this-&gt;assertTrue( count($obj) &gt; 0);
    }</code></pre></div><p>I get this error:<br /></p><div class="codebox"><pre><code>PHPUnit 3.4.9 by Sebastian Bergmann.

PHP Fatal error:  Class &#039;Model_Article&#039; not found in C:\server\www\zend_site\t
ests\application\models\ArticleTest.php on line 23</code></pre></div><p>What am I doing wrong?</p>]]></content>
			<author>
				<name><![CDATA[yusufdestina]]></name>
				<uri>http://www.zendcasts.com/forum/user/192/</uri>
			</author>
			<updated>2010-04-16T13:54:57Z</updated>
			<id>http://www.zendcasts.com/forum/post/799/#p799</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/664/#p664"/>
			<content type="html"><![CDATA[<p>hey boodito, if its a memory issue, try bumping up your limit in the php.ini file!</p>]]></content>
			<author>
				<name><![CDATA[Jon Lebensold]]></name>
				<uri>http://www.zendcasts.com/forum/user/3/</uri>
			</author>
			<updated>2010-02-18T23:48:22Z</updated>
			<id>http://www.zendcasts.com/forum/post/664/#p664</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/658/#p658"/>
			<content type="html"><![CDATA[<p>Hey,<br />When I run the tests, I get the following error:</p><p>PHPUnit 3.4.8 by Sebastian Bergmann.</p><p>.</p><p>Time: 46 seconds, Memory: 32.00Mb</p><p>OK (1 test, 6 assertions)</p><p>Generating code coverage report, this may take a moment.<br />Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35 bytes) in /usr/share/php/PHPUnit/Util/Report/Node/File.php on line 644</p><p>Call Stack:<br />&nbsp; &nbsp; 0.0006&nbsp; &nbsp; &nbsp; 62840&nbsp; &nbsp;1. {main}() /usr/bin/phpunit:0<br />&nbsp; &nbsp; 0.1008&nbsp; &nbsp; 4498284&nbsp; &nbsp;2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:54<br />&nbsp; &nbsp; 0.1008&nbsp; &nbsp; 4499016&nbsp; &nbsp;3. PHPUnit_TextUI_Command-&gt;run() /usr/share/php/PHPUnit/TextUI/Command.php:146<br />&nbsp; &nbsp;42.4558&nbsp; &nbsp;21921616&nbsp; &nbsp;4. PHPUnit_TextUI_TestRunner-&gt;doRun() /usr/share/php/PHPUnit/TextUI/Command.php:213<br />&nbsp; &nbsp;46.2234&nbsp; &nbsp;30628640&nbsp; &nbsp;5. PHPUnit_Util_Report::render() /usr/share/php/PHPUnit/TextUI/TestRunner.php:478<br />&nbsp; &nbsp;46.2948&nbsp; &nbsp;31323220&nbsp; &nbsp;6. PHPUnit_Util_Report::addItems() /usr/share/php/PHPUnit/Util/Report.php:118<br />&nbsp; &nbsp;46.2986&nbsp; &nbsp;31358240&nbsp; &nbsp;7. PHPUnit_Util_Report::addItems() /usr/share/php/PHPUnit/Util/Report.php:154<br />&nbsp; &nbsp;46.3014&nbsp; &nbsp;31385764&nbsp; &nbsp;8. PHPUnit_Util_Report::addItems() /usr/share/php/PHPUnit/Util/Report.php:154<br />&nbsp; &nbsp;46.5328&nbsp; &nbsp;33319972&nbsp; &nbsp;9. PHPUnit_Util_Report_Node_Directory-&gt;addFile() /usr/share/php/PHPUnit/Util/Report.php:146<br />&nbsp; &nbsp;46.5328&nbsp; &nbsp;33321944&nbsp; 10. PHPUnit_Util_Report_Node_File-&gt;__construct() /usr/share/php/PHPUnit/Util/Report/Node/Directory.php:147<br />&nbsp; &nbsp;46.5329&nbsp; &nbsp;33322732&nbsp; 11. PHPUnit_Util_Report_Node_File-&gt;loadFile() /usr/share/php/PHPUnit/Util/Report/Node/File.php:168<br />&nbsp; &nbsp;46.5332&nbsp; &nbsp;33365436&nbsp; 12. token_get_all() /usr/share/php/PHPUnit/Util/Report/Node/File.php:644</p><br /><p>Any idea??</p>]]></content>
			<author>
				<name><![CDATA[boodito]]></name>
				<uri>http://www.zendcasts.com/forum/user/149/</uri>
			</author>
			<updated>2010-02-18T11:05:16Z</updated>
			<id>http://www.zendcasts.com/forum/post/658/#p658</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/569/#p569"/>
			<content type="html"><![CDATA[<p>Thank you for your reply.</p><p>And how about using doctrine mock drivers or sqlite memory database? to solve that problem.</p><p>Thanks!</p>]]></content>
			<author>
				<name><![CDATA[Sebastian Montero]]></name>
			</author>
			<updated>2010-01-22T20:43:35Z</updated>
			<id>http://www.zendcasts.com/forum/post/569/#p569</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/568/#p568"/>
			<content type="html"><![CDATA[<p>Hey Sebastian,</p><p>you can certainly do it in that manner, however as you start writing hundreds of tests,&nbsp; you might find nuking your db every time to slow you down. To do it though, you could just modify your startUp and tearDown methods for the model tests.</p>]]></content>
			<author>
				<name><![CDATA[Jon Lebensold]]></name>
				<uri>http://www.zendcasts.com/forum/user/3/</uri>
			</author>
			<updated>2010-01-22T18:25:14Z</updated>
			<id>http://www.zendcasts.com/forum/post/568/#p568</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/565/#p565"/>
			<content type="html"><![CDATA[<p>Hi, in this example the database is recreated at the begining of the tests, shouldn&#039;t it be recreated for each test? so that tests aren&#039;t affected by previous ones.</p><p>thanks</p>]]></content>
			<author>
				<name><![CDATA[Sebastian Montero]]></name>
			</author>
			<updated>2010-01-21T01:16:34Z</updated>
			<id>http://www.zendcasts.com/forum/post/565/#p565</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/564/#p564"/>
			<content type="html"><![CDATA[<p>Hi, great casts, very helpful!!! </p><p>I just wanted to let you now that I managed to speed up the tests in my application, by more than a minute by deleting the lines that exclude the zend library and the .phtml files in the filter in the phpunit.xml file, I don&#039;t think they are necessary because you exclude them with the main filter.</p><p>Hope this helps</p>]]></content>
			<author>
				<name><![CDATA[Sebastian Montero]]></name>
			</author>
			<updated>2010-01-20T21:48:10Z</updated>
			<id>http://www.zendcasts.com/forum/post/564/#p564</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/542/#p542"/>
			<content type="html"><![CDATA[<p>I&#039;ve been watching your vids the last couple of days. My compliments, they contain just enough detail for me.</p><p>I was just wondering, I&#039;m going to use your setup for my new project. But should it be easy to convert this setup to the definitive setup from Zend+Doctrine once they release it in Q1 2010?</p><p>Thanks!</p>]]></content>
			<author>
				<name><![CDATA[neographikal]]></name>
				<uri>http://www.zendcasts.com/forum/user/127/</uri>
			</author>
			<updated>2010-01-04T15:54:49Z</updated>
			<id>http://www.zendcasts.com/forum/post/542/#p542</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/537/#p537"/>
			<content type="html"><![CDATA[<p>Hello,</p><p>I have followed your tutorial. Preveiously I have created my own form validator in the Zend Framework which was working correctly. But now by using phpunit i get the following error:</p><p>Time: 0 seconds, Memory: 4.50Mb</p><p>OK (0 tests, 0 assertions)</p><p>Generating code coverage report, this may take a moment.<br />Fatal error: Class &#039;Zend_Validate_Abstract&#039; not found in /var/www/nrka/library/JS/Validate/CompareDates.php on line 2</p><p>Call Stack:<br />&nbsp; &nbsp; 0.0004&nbsp; &nbsp; &nbsp; 63840&nbsp; &nbsp;1. {main}() /usr/bin/phpunit:0<br />&nbsp; &nbsp; 0.2052&nbsp; &nbsp; 4486164&nbsp; &nbsp;2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:52<br />&nbsp; &nbsp; 0.2053&nbsp; &nbsp; 4486896&nbsp; &nbsp;3. PHPUnit_TextUI_Command-&gt;run() /usr/share/php/PHPUnit/TextUI/Command.php:147<br />&nbsp; &nbsp; 0.2082&nbsp; &nbsp; 4493296&nbsp; &nbsp;4. PHPUnit_TextUI_TestRunner-&gt;doRun() /usr/share/php/PHPUnit/TextUI/Command.php:214<br />&nbsp; &nbsp; 0.3762&nbsp; &nbsp; 4668380&nbsp; &nbsp;5. PHPUnit_Util_Report::render() /usr/share/php/PHPUnit/TextUI/TestRunner.php:479<br />&nbsp; &nbsp; 0.3763&nbsp; &nbsp; 4669256&nbsp; &nbsp;6. PHPUnit_Framework_TestResult-&gt;getCodeCoverageInformation() /usr/share/php/PHPUnit/Util/Report.php:98<br />&nbsp; &nbsp; 0.3763&nbsp; &nbsp; 4669368&nbsp; &nbsp;7. PHPUnit_Util_Filter::getFilteredCodeCoverage() /usr/share/php/PHPUnit/Framework/TestResult.php:624<br />&nbsp; &nbsp; 0.6731&nbsp; &nbsp; 5975076&nbsp; &nbsp;8. include_once(&#039;/var/www/nrka/library/JS/Validate/CompareDates.php&#039;) /usr/share/php/PHPUnit/Util/Filter.php:382</p><br /><p>Any idea&#039;s how to solve this?</p>]]></content>
			<author>
				<name><![CDATA[Sanders]]></name>
			</author>
			<updated>2010-01-01T10:04:21Z</updated>
			<id>http://www.zendcasts.com/forum/post/537/#p537</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/508/#p508"/>
			<content type="html"><![CDATA[<p>Hi, I tried to follow the tutorial but I allways get a </p><p>Cannot redeclare class PHPUnit_Util_FilterIterator in /path/to/library/PHPUnit/Util/FilterIterator.php on line 163 </p><p>I use Zend Framework 1.9 and PHPUnit 3.4.4 could you give me a tip what I doing wrong?</p><p>best regards <br />aruss</p>]]></content>
			<author>
				<name><![CDATA[aruss]]></name>
			</author>
			<updated>2009-12-16T17:19:12Z</updated>
			<id>http://www.zendcasts.com/forum/post/508/#p508</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/483/#p483"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>jiewmeng wrote:</cite><blockquote><p>when i try to run phpunit i get </p><div class="codebox"><pre><code>D:\Projects\ZF\doctrine\tests&gt;phpunit
create-db - Successfully created database for connection named &#039;Doctrine&#039;
PHPUnit 3.4.3 by Sebastian Bergmann.

PHP Warning:  fopen(/log/testdox.html): failed to open stream: No such file or directory in C:\wamp\bin\php\php5.3.0\PEA
R\PHPUnit\Util\Printer.php on line 107

Warning: fopen(/log/testdox.html): failed to open stream: No such file or directory in C:\wamp\bin\php\php5.3.0\PEAR\PHP
Unit\Util\Printer.php on line 107
PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\P
rinter.php on line 163

Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\Printe
r.php on line 163
PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\P
rinter.php on line 163

Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\Printe
r.php on line 163
PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\P
rinter.php on line 163

Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\Printe
r.php on line 163
PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\P
rinter.php on line 123

Warning: fclose() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\Printe
r.php on line 123


Time: 1 second

←[30;42m←[2KOK (0 tests, 0 assertions)
←[0m←[2K
D:\Projects\ZF\doctrine\tests&gt;</code></pre></div><p>seems like i dont have some pear library installed?</p></blockquote></div><p>i got it working already ... its because i copied code from the phpunit manual ... </p><p>&lt;log type=&quot;testdox<strong>-html</strong>&quot; target=&quot;/log/testdox.html&quot;/&gt;</p><p>vs </p><p>&lt;log type=&quot;testdox&quot; target=&quot;/log/testdox.html&quot;/&gt;</p><p>but when do i use various options eg. testdox&nbsp; vs testdox-html vs testdox-txt etc etc. the manual did not specify whats what</p>]]></content>
			<author>
				<name><![CDATA[jiewmeng]]></name>
			</author>
			<updated>2009-12-12T04:50:09Z</updated>
			<id>http://www.zendcasts.com/forum/post/483/#p483</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: ZC39 – Writing Doctrine Unit Tests with Zend_Test]]></title>
			<link rel="alternate" href="http://www.zendcasts.com/forum/post/482/#p482"/>
			<content type="html"><![CDATA[<p>when i try to run phpunit i get </p><div class="codebox"><pre><code>D:\Projects\ZF\doctrine\tests&gt;phpunit
create-db - Successfully created database for connection named &#039;Doctrine&#039;
PHPUnit 3.4.3 by Sebastian Bergmann.

PHP Warning:  fopen(/log/testdox.html): failed to open stream: No such file or directory in C:\wamp\bin\php\php5.3.0\PEA
R\PHPUnit\Util\Printer.php on line 107

Warning: fopen(/log/testdox.html): failed to open stream: No such file or directory in C:\wamp\bin\php\php5.3.0\PEAR\PHP
Unit\Util\Printer.php on line 107
PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\P
rinter.php on line 163

Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\Printe
r.php on line 163
PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\P
rinter.php on line 163

Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\Printe
r.php on line 163
PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\P
rinter.php on line 163

Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\Printe
r.php on line 163
PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\P
rinter.php on line 123

Warning: fclose() expects parameter 1 to be resource, boolean given in C:\wamp\bin\php\php5.3.0\PEAR\PHPUnit\Util\Printe
r.php on line 123


Time: 1 second

←[30;42m←[2KOK (0 tests, 0 assertions)
←[0m←[2K
D:\Projects\ZF\doctrine\tests&gt;</code></pre></div><p>seems like i dont have some pear library installed?</p>]]></content>
			<author>
				<name><![CDATA[jiewmeng]]></name>
			</author>
			<updated>2009-12-12T03:47:36Z</updated>
			<id>http://www.zendcasts.com/forum/post/482/#p482</id>
		</entry>
</feed>
