Completed
Push — master ( 684184...9a35aa )
by Jeroen De
08:07
created

tests/Integration/parserhooks/DisplayMapTest.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
		$expected = [
75
			'coordinates' => [ 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...
76
			'width' => '420px',
77
			'height' => '420px',
78
			'mappingservice' => 'openlayers',
79
		];
80
81
		$argLists[] = [ $values, $expected ];
82
83
		return $argLists;
84
	}
85
86
}