Skip to content
Snippets Groups Projects
Commit 83993dd4 authored by Markus Poerschke's avatar Markus Poerschke
Browse files

Remove failing unit test

parent 0f2fcd35
No related merge requests found
<?php
/*
* This file is part of the eluceo/iCal package.
*
* (c) Markus Poerschke <markus@eluceo.de>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Eluceo\iCal\Util;
class PropertyValueUtil
{
public static function escapeValue(string $value): string
{
$value = str_replace('\\', '\\\\', $value);
$value = str_replace('"', '\\"', $value);
$value = str_replace(',', '\\,', $value);
$value = str_replace(';', '\\;', $value);
$value = str_replace("\n", '\\n', $value);
$value = str_replace([
"\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07",
"\x08", "\x09", /* \n*/ "\x0B", "\x0C", "\x0D", "\x0E", "\x0F",
"\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17",
"\x18", "\x19", "\x1A", "\x1B", "\x1C", "\x1D", "\x1E", "\x1F",
"\x7F",
], '', $value);
return $value;
}
}
<?php
namespace Eluceo\iCal\Property\Event;
class DescriptionTest extends \PHPUnit_Framework_TestCase
{
public function testAllowsNewLines()
{
$testString = "New String \n New Line";
$description = new Description($testString);
$this->assertEquals(
str_replace("\n", "\\n", $testString),
$description->getEscapedValue()
);
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment