Commit | Line | Data |
---|---|---|
046dd6c2 CW |
1 | <?php |
2 | /* | |
7d61e75f TO |
3 | +--------------------------------------------------------------------+ |
4 | | Copyright CiviCRM LLC. All rights reserved. | | |
5 | | | | |
6 | | This work is published under the GNU AGPLv3 license with some | | |
7 | | permitted exceptions and without any warranty. For full license | | |
8 | | and copyright information, see https://civicrm.org/licensing | | |
9 | +--------------------------------------------------------------------+ | |
046dd6c2 CW |
10 | */ |
11 | ||
12 | /** | |
13 | * Tests for linking to resource files | |
14 | * @group headless | |
15 | */ | |
16 | class CRM_Utils_ICalendarTest extends CiviUnitTestCase { | |
17 | ||
18 | /** | |
19 | * @return array | |
20 | */ | |
21 | public function escapeExamples() { | |
9099cab3 CW |
22 | $cases = []; |
23 | $cases[] = ["Hello | |
39b959db | 24 | this is, a test!", |
9099cab3 CW |
25 | ]; |
26 | $cases[] = ["Hello!! | |
046dd6c2 | 27 | |
39b959db | 28 | this is, a \"test\"!", |
9099cab3 | 29 | ]; |
046dd6c2 CW |
30 | return $cases; |
31 | } | |
32 | ||
33 | /** | |
34 | * @param string $testString | |
35 | * @dataProvider escapeExamples | |
36 | */ | |
37 | public function testParseStrings($testString) { | |
38 | $this->assertEquals($testString, CRM_Utils_ICalendar::unformatText(CRM_Utils_ICalendar::formatText($testString))); | |
39 | } | |
40 | ||
41 | } |