Re: PHPUnit with OutputTestCase

From: Date: Sat, 07 Jul 2007 22:48:23 +0000
Subject: Re: PHPUnit with OutputTestCase
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47266@lists.php.net to get a copy of this message
Laurent Laville a écrit :
Hi PHPUnit testers, I want to know if someone has already used the OutputTestCase extension to check if a full html page is equal to an expected result. I would like to use it to PEAR_Info Test Suite, but i'm not sure if it's the best solution, and also if there is not a problem with long content. While I try the guide example [1], all work fine with PHPUnit 3.1.2, but when I used it with a long content , I always a failure while I pretty sure to have both content (expected, and printed) equals. Feedback are welcome Laurent [1] http://www.phpunit.de/pocket_guide/3.1/en/testcase-extensions.html#testcase-extensions.output
Well, I suspect a new bug with PHPUnit 3.1.2 With TextRunner I got these results PHPUnit 3.1.2 by Sebastian Bergmann. ........F Time: 3 seconds There was 1 failure: 1) testHtmlOutputGeneral(PEAR_Info_TestCase_Output) FAILURES! Tests: 9, Failures: 1. While in the same time, reports gave me : PEAR_Info Test Suite PEAR_Info_TestCase_DefaultConfig . PEAR_Info_TestCase_CustomConfig ... PEAR_Info_TestCase_Install .... PEAR_Info_TestCase_Output . 1..9 # TestSuite "PEAR_Info Test Suite" started. 1..1 # TestSuite "PEAR_Info_TestCase_DefaultConfig" started. ok 1 - testConfigFilesExistInSysConfDir(PEAR_Info_TestCase_DefaultConfig) # TestSuite "PEAR_Info_TestCase_DefaultConfig" ended. # TestSuite "PEAR_Info_TestCase_CustomConfig" started. ok 2 - testConfigFilesExistWithDefaultNameInPearDir(PEAR_Info_TestCase_CustomConfig) ok 3 - testConfigFilesExistWithCustomNameInPearDir(PEAR_Info_TestCase_CustomConfig) ok 4 - testConfigFilesExistInUsrConfDir(PEAR_Info_TestCase_CustomConfig) # TestSuite "PEAR_Info_TestCase_CustomConfig" ended. # TestSuite "PEAR_Info_TestCase_Install" started. ok 5 - testPackageNameInstall(PEAR_Info_TestCase_Install) ok 6 - testPackageNameVersionInstall(PEAR_Info_TestCase_Install) ok 7 - testPackageNameChannelInstall(PEAR_Info_TestCase_Install) ok 8 - testPackageNameVersionChannelInstall(PEAR_Info_TestCase_Install) # TestSuite "PEAR_Info_TestCase_Install" ended. # TestSuite "PEAR_Info_TestCase_Output" started. ok 9 - testHtmlOutputGeneral(PEAR_Info_TestCase_Output) # TestSuite "PEAR_Info_TestCase_Output" ended. # TestSuite "PEAR_Info Test Suite" ended. Laurent Laville

« previous php.pear.dev (#47266) next »