Issues

ZF-20: test failure(s): Zend/Pdf/Element

Description

w/ svn r653

php Zend/Pdf/AllTests.php PHPUnit 3.0.0alpha11 by Sebastian Bergmann.

......................................... .....F..F.FF...........

Time: 00:00 There were 4 failures: 1) testDump(Zend_Pdf_Element_Object_StreamTest) failed asserting that <'55 3 obj <</Length 9 >> stream some data endstream endobj '> is equal to <string:'55 3 obj <</Length 9 >> stream some data endstream endobj '> expected string <55 3 obj <9 >> stream some data endstream endobj > difference < xxxxxxxxxxxxxxxxxxxxxxxxxxxx??> got string <55 3 obj <9 >> stream some data endstream endobj > /webapps/tools/zend_framework/tests/Zend/Pdf/Element/Object/StreamTest.php:42 /webapps/tools/zend_framework/tests/Zend/Pdf/AllTests.php:15 /webapps/tools/zend_framework/tests/Zend/Pdf/AllTests.php:29 2) testToString(Zend_Pdf_Element_StreamTest) failed asserting that <'stream some text ( /webapps/tools/zend_framework/tests/Zend/Pdf/Element/StreamTest.php:40 /webapps/tools/zend_framework/tests/Zend/Pdf/AllTests.php:15 /webapps/tools/zend_framework/tests/Zend/Pdf/AllTests.php:29 3) testClear(Zend_Pdf_Element_StreamTest) failed asserting that <'stream

endstream'> is equal to <string:'stream

endstream'> expected string <stream

endstream> difference < xxxxxxxxxxx??> got string <stream

endstream> /webapps/tools/zend_framework/tests/Zend/Pdf/Element/StreamTest.php:54 /webapps/tools/zend_framework/tests/Zend/Pdf/AllTests.php:15 /webapps/tools/zend_framework/tests/Zend/Pdf/AllTests.php:29 4) testAppend(Zend_Pdf_Element_StreamTest) failed asserting that <'stream some text ( /webapps/tools/zend_framework/tests/Zend/Pdf/Element/StreamTest.php:62 /webapps/tools/zend_framework/tests/Zend/Pdf/AllTests.php:15 /webapps/tools/zend_framework/tests/Zend/Pdf/AllTests.php:29

FAILURES! Tests: 64, Failures: 4.

Comments

If not for you, please bump to Alexander

I neglected to run the unit tests after working on ZF-15.

ZF-15 changed the line ending string used by Zend_Pdf_Element_Stream from CRLF to LF, which affected the resulting binary string. The unit tests were checking for a specific binary string result, which included the older-style line endings.

Updated the unit tests so that the expected result uses the new style of line endings (LF only). Tests now pass:


php Zend/Pdf/AllTests.php PHPUnit 2.3.6 by Sebastian Bergmann.

......................................... .......................

Time: 0.032178

OK (64 tests)

w/ r654, verified. thx.