Completed
Pull Request — master (#130)
by None
07:05
created

WmsOverlayParserTest::validInputProvider()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 22
Code Lines 13

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 22
rs 9.2
cc 3
eloc 13
nc 3
nop 0
1
<?php
2
3
namespace Maps\Test;
4
5
use Maps\Elements\WmsOverlay;
6
7
/**
8
 * @covers Maps\WmsOverlayParser
9
 * @licence GNU GPL v2+
10
 * @author Mathias Mølster Lidal <[email protected]>
11
 */
12
class WmsOverlayParserTest extends \ValueParsers\Test\StringValueParserTest {
0 ignored issues
show
Bug introduced by
There is one abstract method getInstance in this class; you could implement it, or declare this class as abstract.
Loading history...
13
14
	/**
15
	 * @see ValueParserTestBase::validInputProvider
16
	 *
17
	 * @since 3.0
18
	 *
19
	 * @return array
20
	 */
21
	public function validInputProvider() {
22
		$argLists = array();
23
24
		$valid = array(
25
			"http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi? Foundation.GTOPO30" =>
26
				array( "http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi?", "Foundation.GTOPO30" ),
27
			"http://maps.imr.no:80/geoserver/wms? vulnerable_areas:Identified_coral_area coral_identified_areas" =>
28
				array( "http://maps.imr.no:80/geoserver/wms?", "vulnerable_areas:Identified_coral_area", "coral_identified_areas" )
29
		);
30
31
		foreach ( $valid as $value => $expected ) {
32
			$expectedOverlay = new WmsOverlay( $expected[0], $expected[1] );
33
34
			if ( count( $expected ) == 3 ) {
35
				$expectedOverlay->setWmsStyleName( $expected[2] );
36
			}
37
38
			$argLists[] = array( (string)$value, $expectedOverlay );
39
		}
40
41
		return $argLists;
42
	}
43
44
45
	/**
46
	 * @see ValueParserTestBase::getParserClass
47
	 *
48
	 * @since 3.0
49
	 *
50
	 * @return string
51
	 */
52
	protected function getParserClass() {
53
		return 'Maps\WmsOverlayParser';
54
	}
55
56
	/**
57
	 * @see ValueParserTestBase::requireDataValue
58
	 *
59
	 * @since 3.0
60
	 *
61
	 * @return boolean
62
	 */
63
	protected function requireDataValue() {
64
		return false;
65
	}
66
67
}
68