35 function assertVObjectEqualsVObject($expected, $actual,
$message =
'') {
38 $getObj =
function(
$input) use ($self) {
47 $this->fail(
'Input must be a string, stream or VObject component');
50 if (
$input instanceof Component\VCalendar && (
string)
$input->CALSCALE ===
'GREGORIAN') {
57 $expected = $getObj($expected)->serialize();
58 $actual = $getObj($actual)->serialize();
61 preg_match_all(
'|^([A-Z]+):\\*\\*ANY\\*\\*\r$|m', $expected, $matches, PREG_SET_ORDER);
63 foreach ($matches as $match) {
65 $actual = preg_replace(
66 '|^' . preg_quote($match[1],
'|') .
':(.*)\r$|m',
67 $match[1] .
':**ANY**' .
"\r",
catch(Exception $e) $message
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.