|
|
|
Not the same error, at least, I doesn't look like it, but it is a unit test failure, so I'll update this.
Versions: PHP Version => 5.1.4-pl0-gentoo System => Linux user00265 2.6.16-gentoo-r9 #1 SMP PREEMPT Mon Jun 19 04:51:19 AST 2006 i686 Build Date => Jun 20 2006 17:43:25 Configure Command => './configure' '--prefix=/usr/lib/php5' '--sysconfdir=/etc' '--cache-file=./config.cache' '--enable-cli' '--disable-cgi' '--with-config-file-path=/etc/php/cli-php5' '--with-config-file-scan-dir=/etc/php/cli-php5/ext-active' '--without-pear' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--with-curl' '--with-curlwrappers' '--disable-dbase' '--enable-exif' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--enable-ftp' '--with-gettext' '--with-gmp' '--without-hwapi' '--without-informix' '--without-kerberos' '--enable-mbstring' '--with-mcrypt' '--enable-memory-limit' '--with-mhash' '--without-ming' '--without-msql' '--without-mssql' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--enable-pcntl' '--with-pgsql' '--with-pspell' '--without-recode' '--disable-shmop' '--with-snmp' '--enable-soap' '--enable-sockets' '--without-sybase' '--without-sybase-ct' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-tidy' '--disable-tokenizer' '--enable-wddx' '--with-xmlrpc' '--with-xsl' '--with-zlib' '--disable-debug' '--enable-dba' '--with-cdb' '--with-db4' '--without-flatfile' '--with-gdbm' '--with-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gd' '--with-imap' '--with-imap-ssl' '--with-ldap' '--without-ldap-sasl' '--with-mysql=/usr/lib/mysql' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=/usr/bin/mysql_config' '--without-pdo-dblib' '--without-pdo-firebird' '--with-pdo-mysql=/usr' '--without-pdo-odbc' '--with-pdo-pgsql' '--with-readline' '--without-libedit' '--without-mm' '--enable-sqlite-utf8' '--with-pic' '--enable-maintainer-zts' Server API => Command Line Interface Virtual Directory Support => enabled Configuration File (php.ini) Path => /etc/php/cli-php5/php.ini Scan this dir for additional .ini files => /etc/php/cli-php5/ext-active additional .ini files parsed => /etc/php/cli-php5/ext-active/zip.ini PHP API => 20041225 PHP Extension => 20050922 Zend Extension => 220051025 Debug Build => no Thread Safety => enabled Zend Memory Manager => enabled IPv6 Support => enabled httpd -V user00265 ~ # apache2 -V Server version: Apache/2.0.55 Server built: Jun 19 2006 20:56:35 Server's Module Magic Number: 20020903:11 Architecture: 32-bit Server compiled with.... -D APACHE_MPM_DIR="server/mpm/worker" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT="/usr" -D SUEXEC_BIN="/usr/sbin/suexec2" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types" -D SERVER_CONFIG_FILE="/etc/apache2/httpd.conf" svn info | grep -i revision ryuji@user00265 ~/Zend/Framework $ svn info | grep -i revision Revision: 677 Error returned: ryuji@user00265 ~/Zend/Framework/tests $ php Zend/Mime/AllTests.php
PHPUnit 2.3.6 by Sebastian Bergmann.
..F.....
Time: 0.005915
There was 1 failure:
1) testStreamEncoding(Zend_Mime_PartTest)
expected: <...> but was: <...riginal);
}
}
>
/home/ryuji/Zend/Framework/tests/Zend/Mime/PartTest.php:90
/home/ryuji/Zend/Framework/tests/Zend/Mime/AllTests.php:16
/home/ryuji/Zend/Framework/tests/Zend/Mime/AllTests.php:31
FAILURES!!!
Tests run: 8, Failures: 1, Errors: 0, Incomplete Tests: 0.
I found a syntax issue in the B64Filter (base64 stream conversion filter) where it was using a concatenation operator instead of addition operator. This fix was applied in patch 689.
Please test and update the ticket to indicate whether this corrects the testing issue. Thanks! w/ ZF Revision: 689, still problems ....
/webapps/tools/zend_framework/tests > php Zend/Mime/AllTests.php ..F..... Time: 00:00
/**
/**
/**
protected function setUp() { $this->_testText = \'safdsafsaˆlg ˆˆgdˆˆ sdˆjgˆsdjgˆldˆgksdˆgjˆsdfgˆdsjˆgjsdˆgjˆdfsjgˆdsfjˆdjsˆg kjhdkj \' . \'fgaskjfdh gksjhgjkdh gjhfsdghdhgksdjhg\'; $this->part = new Zend_Mime_Part($this->_testText); $this->part->encoding = Zend_Mime::ENCODING_BASE64; $this->part->type = "text/plain"; $this->part->filename = \'test.txt\'; $this->part->disposition = \'attachment\'; $this->part->charset = \'iso8859-1\'; $this->part->id = \'4711\'; } public function testHeaders() $actual = $this->part->getHeaders(); foreach ($expectedHeaders as $expected) {
$this->assertContains($expected, $actual);
} public function testContentEncoding() { // Test with base64 encoding $content = $this->part->getContent(); $this->assertEquals($this->_testText, base64_decode($content)); // Test with quotedPrintable Encoding: $this->part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE; $content = $this->part->getContent(); $this->assertEquals($this->_testText, quoted_printable_decode($content)); // Test with 8Bit encoding $this->part->encoding = Zend_Mime::ENCODING_8BIT; $content = $this->part->getContent(); $this->assertEquals($this->_testText, $content); } public function testStreamEncoding() // Test Base64 // test QuotedPrintable
/**
/**
/**
protected function setUp() { $this->_testText = 'safdsafsaˆlg ˆˆgdˆˆ sdˆjgˆsdjgˆldˆgksdˆgjˆsdfgˆdsjˆgjsdˆgjˆdfsjgˆdsfjˆdjsˆg kjhdkj ' . 'fgaskjfdh gksjhgjkdh gjhfsdghdhgksdjhg'; $this->part = new Zend_Mime_Part($this->_testText); $this->part->encoding = Zend_Mime::ENCODING_BASE64; $this->part->type = "text/plain"; $this->part->filename = 'test.txt'; $this->part->disposition = 'attachment'; $this->part->charset = 'iso8859-1'; $this->part->id = '4711'; } public function testHeaders() $actual = $this->part->getHeaders(); foreach ($expectedHeaders as $expected) {
$this->assertContains($expected, $actual);
} public function testContentEncoding() { // Test with base64 encoding $content = $this->part->getContent(); $this->assertEquals($this->_testText, base64_decode($content)); // Test with quotedPrintable Encoding: $this->part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE; $content = $this->part->getContent(); $this->assertEquals($this->_testText, quoted_printable_decode($content)); // Test with 8Bit encoding | ||||||||||||||||||||||||||||||||||||||||||||||
w/ ZF svn r650 php 52-dev OSX 10.4.6 upgrade to PHPUnit 300a11 % php Zend/Mime/AllTests.php PHPUnit 3.0.0alpha11 by Sebastian Bergmann. ..F..... Time: 00:00 There was 1 failure: 1) testStreamEncoding(Zend_Mime_PartTest) failed asserting that <'<?php /** * @package Zend_Mime * @subpackage UnitTests */ /** * Zend_Mime_Part */ require_once \'Zend/Mime/Part.php\'; /** * PHPUnit2 test case */ require_once \'PHPUnit2/Framework/TestCase.php\'; /** * @package Zend_Mime * @subpackage UnitTests */ class Zend_Mime_PartTest extends PHPUnit2_Framework_TestCase { /** * MIME part test object * * @var Zend_Mime_Part */ protected $_part = null; protected $_testText; protected function setUp() { $this->_testText = \'safdsafsaˆlg ˆˆgdˆˆ sdˆjgˆsdjgˆldˆgksdˆgjˆsdfgˆdsjˆgjsdˆgjˆdfsjgˆdsfjˆdjsˆg kjhdkj \' . \'fgaskjfdh gksjhgjkdh gjhfsdghdhgksdjhg\'; $this->part = new Zend_Mime_Part($this->_testText); $this->part->encoding = Zend_Mime::ENCODING_BASE64; $this->part->type = "text/plain"; $this->part->filename = \'test.txt\'; $this->part->disposition = \'attachment\'; $this->part->charset = \'iso8859-1\'; $this->part->id = \'4711\'; } public function testHeaders() { $expectedHeaders = array(\'Content-Type: text/plain\', \'Content-Transfer-Encoding: \' . Zend_Mime::ENCODING_BASE64, \'Content-Disposition: attachment\', \'filename="test.txt"\', \'charset="iso8859-1"\', \'Content-ID: <4711>\'); $actual = $this->part->getHeaders(); foreach ($expectedHeaders as $expected) { $this->assertContains($expected, $actual); } } public function testContentEncoding() { // Test with base64 encoding $content = $this->part->getContent(); $this->assertEquals($this->_testText, base64_decode($content)); // Test with quotedPrintable Encoding: $this->part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE; $content = $this->part->getContent(); $this->assertEquals($this->_testText, quoted_printable_decode($content)); // Test with 8Bit encoding $this->part->encoding = Zend_Mime::ENCODING_8BIT; $content = $this->part->getContent(); $this->assertEquals($this->_testText, $content); } public function testStreamEncoding() { $testfile = realpath(__FILE__); $original = file_get_contents($testfile); // Test Base64 $fp = fopen($testfile,\'rb\'); $this->assertTrue(is_resource($fp)); $part = new Zend_Mime_Part($fp); $part->encoding = Zend_Mime::ENCODING_BASE64; $fp2 = $part->getEncodedStream(); $this->assertTrue(is_resource($fp2)); $encoded = stream_get_contents($fp2); fclose($fp); $this->assertEquals(base64_decode($encoded),$original); // test QuotedPrintable $fp = fopen($testfile,\'rb\'); $this->assertTrue(is_resource($fp)); $part = new Zend_Mime_Part($fp); $part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE; $fp2 = $part->getEncodedStream(); $this->assertTrue(is_resource($fp2)); $encoded = stream_get_contents($fp2); fclose($fp); $this->assertEquals(quoted_printable_decode($encoded),$original); } } '> is equal to <string:'<?php /** * @package Zend_Mime * @subpackage UnitTests */ /** * Zend_Mime_Part */ require_once \'Zend/Mime/Part.php\'; /** * PHPUnit2 test case */ require_once \'PHPUnit2/Framework/TestCase.php\'; /** * @package Zend_Mime * @subpackage UnitTests */ class Zend_Mime_PartTest extends PHPUnit2_Framework_TestCase { /** * MIME part test object * * @var Zend_Mime_Part */ protected $_part = null; protected $_testText; protected function setUp() { $this->_testText = \'safdsafsaˆlg ˆˆgdˆˆ sdˆjgˆsdjgˆldˆgksdˆgjˆsdfgˆdsjˆgjsdˆgjˆdfsjgˆdsfjˆdjsˆg kjhdkj \' . \'fgaskjfdh gksjhgjkdh gjhfsdghdhgksdjhg\'; $this->part = new Zend_Mime_Part($this->_testText); $this->part->encoding = Zend_Mime::ENCODING_BASE64; $this->part->type = "text/plain"; $this->part->filename = \'test.txt\'; $this->part->disposition = \'attachment\'; $this->part->charset = \'iso8859-1\'; $this->part->id = \'4711\'; } public function testHeaders() { $expectedHeaders = array(\'Content-Type: text/plain\', \'Content-Transfer-Encoding: \' . Zend_Mime::ENCODING_BASE64, \'Content-Disposition: attachment\', \'filename="test.txt"\', \'charset="iso8859-1"\', \'Content-ID: <4711>\'); $actual = $this->part->getHeaders(); foreach ($expectedHeaders as $expected) { $this->assertContains($expected, $actual); } } public function testContentEncoding() { // Test with base64 encoding $content = $this->part->getContent(); $this->assertEquals($this->_testText, base64_decode($content)); // Test with quotedPrintable Encoding: $this->part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE; $content = $this->part->getContent(); $this->assertEquals($this->_testText, quoted_printable_decode($content)); // Test with 8Bit encoding $this->part->encoding = Zend_Mime::ENCODING_8BIT; $content = $this->part->getContent(); $this->assertEquals($this->_testText, $content); } public function testStreamEncoding() { $testfile = realpath(__FILE__); $original = file_get_contents($testfile); // Test Base64 $fp = fopen($testfile,\'rb\'); $this->assertTrue(is_resource($fp)); $part = new Zend_Mime_Part($fp); $part->encoding = Zend_Mime::ENCODING_BASE64; $fp2 = $part->getEncodedStream(); $this->assertTrue(is_resource($fp2)); $encoded = stream_get_contents($fp2); fclose($fp); $this->assertEquals(base64_decode($encoded),$original); // test QuotedPrintable $fp = fopen($testfile,\'rb\'); $this->assertTrue(is_resource($fp)); $part = new Zend_Mime_Part($fp); $part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE; $fp2 = $part->getEncodedStream(); $this->assertTrue(is_resource($fp2)); $encoded = stream_get_contents($fp2); fclose($fp); $this->assertEquals(quoted_printable_decode($encoded),$o'> expected string <<?php /** * @package Zend_Mime * @subpackage UnitTests */ /** * Zend_Mime_Part */ require_once 'Zend/Mime/Part.php'; /** * PHPUnit2 test case */ require_once 'PHPUnit2/Framework/TestCase.php'; /** * @package Zend_Mime * @subpackage UnitTests */ class Zend_Mime_PartTest extends PHPUnit2_Framework_TestCase { /** * MIME part test object * * @var Zend_Mime_Part */ protected $_part = null; protected $_testText; protected function setUp() { $this->_testText = 'safdsafsaˆlg ˆˆgdˆˆ sdˆjgˆsdjgˆldˆgksdˆgjˆsdfgˆdsjˆgjsdˆgjˆdfsjgˆdsfjˆdjsˆg kjhdkj ' . 'fgaskjfdh gksjhgjkdh gjhfsdghdhgksdjhg'; $this->part = new Zend_Mime_Part($this->_testText); $this->part->encoding = Zend_Mime::ENCODING_BASE64; $this->part->type = "text/plain"; $this->part->filename = 'test.txt'; $this->part->disposition = 'attachment'; $this->part->charset = 'iso8859-1'; $this->part->id = '4711'; } public function testHeaders() { $expectedHeaders = array('Content-Type: text/plain', 'Content-Transfer-Encoding: ' . Zend_Mime::ENCODING_BASE64, 'Content-Disposition: attachment', 'filename="test.txt"', 'charset="iso8859-1"', 'Content-ID: <4711>'); $actual = $this->part->getHeaders(); foreach ($expectedHeaders as $expected) { $this->assertContains($expected, $actual); } } public function testContentEncoding() { // Test with base64 encoding $content = $this->part->getContent(); $this->assertEquals($this->_testText, base64_decode($content)); // Test with quotedPrintable Encoding: $this->part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE; $content = $this->part->getContent(); $this->assertEquals($this->_testText, quoted_printable_decode($content)); // Test with 8Bit encoding $this->part->encoding = Zend_Mime::ENCODING_8BIT; $content = $this->part->getContent(); $this->assertEquals($this->_testText, $content); } public function testStreamEncoding() { $testfile = realpath(__FILE__); $original = file_get_contents($testfile); // Test Base64 $fp = fopen($testfile,'rb'); $this->assertTrue(is_resource($fp)); $part = new Zend_Mime_Part($fp); $part->encoding = Zend_Mime::ENCODING_BASE64; $fp2 = $part->getEncodedStream(); $this->assertTrue(is_resource($fp2)); $encoded = stream_get_contents($fp2); fclose($fp); $this->assertEquals(base64_decode($encoded),$original); // test QuotedPrintable $fp = fopen($testfile,'rb'); $this->assertTrue(is_resource($fp)); $part = new Zend_Mime_Part($fp); $part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE; $fp2 = $part->getEncodedStream(); $this->assertTrue(is_resource($fp2)); $encoded = stream_get_contents($fp2); fclose($fp); $this->assertEquals(quoted_printable_decode($encoded),$o> difference < ??????????????????> got string <<?php /** * @package Zend_Mime * @subpackage UnitTests */ /** * Zend_Mime_Part */ require_once 'Zend/Mime/Part.php'; /** * PHPUnit2 test case */ require_once 'PHPUnit2/Framework/TestCase.php'; /** * @package Zend_Mime * @subpackage UnitTests */ class Zend_Mime_PartTest extends PHPUnit2_Framework_TestCase { /** * MIME part test object * * @var Zend_Mime_Part */ protected $_part = null; protected $_testText; protected function setUp() { $this->_testText = 'safdsafsaˆlg ˆˆgdˆˆ sdˆjgˆsdjgˆldˆgksdˆgjˆsdfgˆdsjˆgjsdˆgjˆdfsjgˆdsfjˆdjsˆg kjhdkj ' . 'fgaskjfdh gksjhgjkdh gjhfsdghdhgksdjhg'; $this->part = new Zend_Mime_Part($this->_testText); $this->part->encoding = Zend_Mime::ENCODING_BASE64; $this->part->type = "text/plain"; $this->part->filename = 'test.txt'; $this->part->disposition = 'attachment'; $this->part->charset = 'iso8859-1'; $this->part->id = '4711'; } public function testHeaders() { $expectedHeaders = array('Content-Type: text/plain', 'Content-Transfer-Encoding: ' . Zend_Mime::ENCODING_BASE64, 'Content-Disposition: attachment', 'filename="test.txt"', 'charset="iso8859-1"', 'Content-ID: <4711>'); $actual = $this->part->getHeaders(); foreach ($expectedHeaders as $expected) { $this->assertContains($expected, $actual); } } public function testContentEncoding() { // Test with base64 encoding $content = $this->part->getContent(); $this->assertEquals($this->_testText, base64_decode($content)); // Test with quotedPrintable Encoding: $this->part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE; $content = $this->part->getContent(); $this->assertEquals($this->_testText, quoted_printable_decode($content)); // Test with 8Bit encoding $this->part->encoding = Zend_Mime::ENCODING_8BIT; $content = $this->part->getContent(); $this->assertEquals($this->_testText, $content); } public function testStreamEncoding() { $testfile = realpath(__FILE__); $original = file_get_contents($testfile); // Test Base64 $fp = fopen($testfile,'rb'); $this->assertTrue(is_resource($fp)); $part = new Zend_Mime_Part($fp); $part->encoding = Zend_Mime::ENCODING_BASE64; $fp2 = $part->getEncodedStream(); $this->assertTrue(is_resource($fp2)); $encoded = stream_get_contents($fp2); fclose($fp); $this->assertEquals(base64_decode($encoded),$original); // test QuotedPrintable $fp = fopen($testfile,'rb'); $this->assertTrue(is_resource($fp)); $part = new Zend_Mime_Part($fp); $part->encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE; $fp2 = $part->getEncodedStream(); $this->assertTrue(is_resource($fp2)); $encoded = stream_get_contents($fp2); fclose($fp); $this->assertEquals(quoted_printable_decode($encoded),$original); } } > /webapps/tools/zend_framework/tests/Zend/Mime/PartTest.php:90 /webapps/tools/zend_framework/tests/Zend/Mime/AllTests.php:16 /webapps/tools/zend_framework/tests/Zend/Mime/AllTests.php:31 FAILURES! Tests: 8, Failures: 1.