Completed
Push — fix-displaymap-geoservice ( 878215 )
by Jeroen De
03:18
created

testForSomeReasonPhpSegfaultsIfThereIsOneMethodLess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Maps\Test;
4
5
use DataValues\Geo\Values\LatLongValue;
6
use Maps\Elements\Location;
7
8
/**
9
 * @covers MapsDisplayMap
10
 *
11
 * @licence GNU GPL v2+
12
 * @author Jeroen De Dauw < [email protected] >
13
 */
14
class DisplayMapTest extends ParserHookTest {
15
16
	/**
17
	 * @see ParserHookTest::getInstance
18
	 * @since 2.0
19
	 * @return \ParserHook
20
	 */
21
	protected function getInstance() {
22
		return new \MapsDisplayMap();
23
	}
24
25
	/**
26
	 * @see ParserHookTest::parametersProvider
27
	 * @since 2.0
28
	 * @return array
29
	 */
30
	public function parametersProvider() {
31
		$paramLists = [];
32
33
		// TODO
34
		$paramLists[] = [ 'coordinates' => '4,2' ];
35
36
		$paramLists[] = [ 'location' => '4,2' ];
37
38
		$paramLists[] = [ 'location' => 'new york city' ];
39
40
		$paramLists[] = [
41
			'service' => 'googlemaps',
42
			'location' => 'new york city',
43
			'zoom' => '10',
44
			'minzoom' => '5',
45
			'maxzoom' => '7',
46
			'autozoom' => 'off',
47
		];
48
49
		return $this->arrayWrap( $paramLists );
50
	}
51
52
	/**
53
	 * @see ParserHookTest::processingProvider
54
	 * @since 3.0
55
	 * @return array
56
	 */
57
	public function processingProvider() {
58
		$argLists = [];
59
60
		$values = [
61
			'locations' => '4,2; New York City; 13,37',
62
			'width' => '420',
63
			'height' => '420',
64
			'service' => 'openlayers',
65
		];
66
67
		$expected = [
68
			'coordinates' => [ '4,2', 'New York City', '13,37' ],
69
			'width' => '420px',
70
			'height' => '420px',
71
			'mappingservice' => 'openlayers',
72
		];
73
74
		$argLists[] = [ $values, $expected ];
75
76
		return $argLists;
77
	}
78
79
}