Frederik Holljen wrote:
> On Tuesday 23 January 2007 16:41, Alexandru Stanoi wrote:
>> Author: Alexandru Stanoi
>> Date: 2007-01-23 13:41:13 +0100 (Tue, 23 Jan 2007)
>> New Revision: 4547
>>
>> Log:
>> - Fixed 2 tests failing because of whitespace issues.
>>
>> Modified:
>>    trunk/Mail/tests/interfaces/part_test.php
>>
>> Modified: trunk/Mail/tests/interfaces/part_test.php
>> ===================================================================
>> --- trunk/Mail/tests/interfaces/part_test.php        2007-01-23 12:26:35 UTC 
>> (rev
>> 4546) +++ trunk/Mail/tests/interfaces/part_test.php  2007-01-23 12:41:13 UTC
>> (rev 4547) @@ -148,7 +148,9 @@
>>                                                     '1024'
>>                                                     );
>>          $this->part->contentDisposition = $cd;
>> -        $this->assertEquals( $expectedResult,
>> $this->part->generateHeaders() ); +        //var_dump( str_replace( "\r\n",
>> "", $this->part->generateHeaders() ) ); +        $this->assertEquals( trim(
>> $expectedResult ), str_replace( ezcMailTools::lineBreak(), "",
>> $this->part->generateHeaders() ) ); +
>>      }
>>
>>      public function testGenerateHeadersContentDispositionAddParams()
>> @@ -172,7 +174,7 @@
>>                                                            'x-speed' =>
>> '52' ) );
>>          $this->part->contentDisposition = $cd;
>> -        $this->assertEquals( $expectedResult,
>> $this->part->generateHeaders() ); +        $this->assertEquals( trim(
>> $expectedResult ), str_replace( ezcMailTools::lineBreak(), "",
>> $this->part->generateHeaders() ) ); }
>>
>>      public static function suite()
> I'm not sure if this is correct either. Why are you removing linebreaks?

Because the folding with ezcMailHeaderFolder::foldAny() adds linebreaks. 
$expectedResult did not contain those linebreaks as there was no folding 
until now.

Now I am looking into creating classes for the headers as you suggested.

-- 
Alex Stanoi
eZ Components System Developer
eZ Systems | http://ez.no
-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to