Completed
Push — master ( 19a7d3...6b997b )
by Tim
13:45
created

LineTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 28
rs 10
1
<?php
2
3
namespace JMBTechnologyLimited\ICalDissect;
4
5
/**
6
 *
7
 * @link https://github.com/JMB-Technology-Limited/ICalDissect
8
 * @license https://raw.github.com/JMB-Technology-Limited/ICalDissect/master/LICENSE.txt 3-clause BSD
9
 * @copyright (c) 2014, JMB Technology Limited, http://jmbtechnology.co.uk/
10
 * @author James Baster <[email protected]>
11
 */
12
class LineTest  extends \PHPUnit_Framework_TestCase {
13
14
15
16
	function dataForTestMultiLineDescription() {
17
		return array(
18
				array('IcalParserBasicImportMultiLineDescription.ical','Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Lizard'),
19
				array('IcalParserBasicImportMultiLineDescription2.ical','Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Lizard:Blue'),
20
				array('IcalParserBasicImportMultiLineDescription3.ical','Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Dog Cat Go Miaow Lizard:Blue abcdefgtijklmnopqrstuvwxyz abcdefgtijklmnopqrstuvwxyz 12345'),
21
			);
22
	}
23
24
	/**
25
     * @dataProvider dataForTestMultiLineDescription
26
     */		
27
	function testMultiLineDescription ($filename, $output) {
28
		$parser = new ICalParser();
29
		$this->assertTrue($parser->parseFromFile(dirname(__FILE__)."/data/".$filename));
30
		$events = $parser->getEvents();
31
		$this->assertEquals(1, count($events));
32
		$event = $events[0];
33
		$this->assertEquals($output, $event->getDescription());
34
	}
35
36
37
38
39
}
40
41