Completed
Push — address-as-title ( 601934...feca68 )
by Peter
09:00
created

DisplayMapTest::processingProvider()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 24
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

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

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
75
		$location->setTitle( '4,2' );
76
77
		$expected = [
78
			'coordinates' => [ $location ],
79
			'width' => '420px',
80
			'height' => '420px',
81
			'mappingservice' => 'openlayers',
82
		];
83
84
		$argLists[] = [ $values, $expected ];
85
86
		return $argLists;
87
	}
88
89
}