gunnar: server/php-kolab/Kolab_Filter/tests incoming_line_end.phpt, NONE, 1.1

cvs at kolab.org cvs at kolab.org
Fri Dec 7 19:49:23 CET 2007


Author: gunnar

Update of /kolabrepository/server/php-kolab/Kolab_Filter/tests
In directory doto:/tmp/cvs-serv1920/php-kolab/Kolab_Filter/tests

Added Files:
	incoming_line_end.phpt 
Log Message:
Fix removal of the empty line between header and body. Added a unit test for that.

--- NEW FILE: incoming_line_end.phpt ---
--TEST--
Test handling of \r\n
--SKIPIF--
--FILE--
<?php
require_once 'Kolab/Filter/Incoming.php';

/* Our test configuration */
$conf = array();
$conf['log']['enabled']          = true;
$conf['log']['priority']         = PEAR_LOG_DEBUG; // Leave this on DEBUG for now. We just restructured the package...
$conf['log']['type']             = 'console';
$conf['log']['name']             = 'ignored';
$conf['log']['ident']            = 'Kolab Filter';
$conf['log']['params']['append'] = true;
$conf['filter']['tempdir'] = './tmp';
$_SERVER['argv'] = array('test', '-h', 'example.com', '-s', 'me at example.com', '-r', 'me at example.com', '-c', '127.0.0.1');
$logger = Horde::getLogger();

$logger->_lineFormat = '%2$s [%3$s] %7$s';
// Activate this if you need the log information. This will
// make the test fail though
//$logger->_lineFormat = '%2$s [%3$s] %4$s %7$s';

$inh = fopen('_data/empty.eml', 'r');

/* Setup the class */
$parser   = &new Filter_Incoming('StdOut', true);

/* Parse the mail */
$parser->parse($inh);
?>
--EXPECT--
Kolab Filter [debug] logMessage
Kolab Filter [debug] logMessage
Mail from sender: me at example.com
Mail to recipient: me at example.com
From: me at example.com
To:me at example.com
Subject: xx
X-Kolab-Scheduling-Message: FALSE

xx
.
Kolab Filter [debug] logMessage
Kolab Filter [info] logMessage





More information about the commits mailing list