Completed
Push — elements-php7 ( 4564aa...b21d4c )
by Jeroen De
25:24 queued 17:12
created

ImageOverlayTest::invalidConstructorProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Maps\Tests\Elements;
4
5
use DataValues\Geo\Values\LatLongValue;
6
use Maps\Elements\ImageOverlay;
7
8
/**
9
 * @covers \Maps\Elements\ImageOverlay
10
 *
11
 * @licence GNU GPL v2+
12
 * @author Jeroen De Dauw < [email protected] >
13
 */
14
class ImageOverlayTest extends RectangleTest {
15
16
	/**
17
	 * @see BaseElementTest::getClass
18
	 *
19
	 * @since 3.0
20
	 *
21
	 * @return string
22
	 */
23
	public function getClass() {
24
		return ImageOverlay::class;
25
	}
26
27
	public function validConstructorProvider() {
28
		foreach ( parent::validConstructorProvider() as $argList ) {
29
			$argList[] = 'Foo.png';
30
			yield $argList;
31
		}
32
	}
33
34
	public function invalidConstructorProvider() {
35
		yield [ new LatLongValue( 4, 2 ), new LatLongValue( 4, 2 ), 'Foo.png' ];
36
	}
37
38
	/**
39
	 * @dataProvider instanceProvider
40
	 *
41
	 * @param ImageOverlay $imageOverlay
42
	 * @param array $arguments
43
	 */
44
	public function testGetImage( ImageOverlay $imageOverlay, array $arguments ) {
45
		$this->assertEquals( $arguments[2], $imageOverlay->getImage() );
46
	}
47
48
}
49
50
51
52