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\Tests\Elements; |
||
4 | |||
5 | use Maps\Elements\ImageOverlay; |
||
6 | |||
7 | /** |
||
8 | * @covers Maps\Elements\ImageOverlay |
||
9 | * |
||
10 | * @since 3.0 |
||
11 | * |
||
12 | * @licence GNU GPL v2+ |
||
13 | * @author Jeroen De Dauw < [email protected] > |
||
14 | */ |
||
15 | class ImageOverlayTest extends RectangleTest { |
||
16 | |||
17 | /** |
||
18 | * @see BaseElementTest::getClass |
||
19 | * |
||
20 | * @since 3.0 |
||
21 | * |
||
22 | * @return string |
||
23 | */ |
||
24 | public function getClass() { |
||
25 | return ImageOverlay::class; |
||
26 | } |
||
27 | |||
28 | public function validConstructorProvider() { |
||
29 | $argLists = parent::validConstructorProvider(); |
||
30 | |||
31 | foreach ( $argLists as &$argList ) { |
||
32 | $argList[] = 'Foo.png'; |
||
33 | } |
||
34 | |||
35 | return $argLists; |
||
36 | } |
||
37 | |||
38 | public function invalidConstructorProvider() { |
||
39 | $argLists = parent::validConstructorProvider(); |
||
0 ignored issues
–
show
|
|||
40 | |||
41 | foreach ( $argLists as &$argList ) { |
||
42 | $argList[] = null; |
||
43 | } |
||
44 | |||
45 | return $argLists; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @dataProvider instanceProvider |
||
50 | * @param ImageOverlay $imageOverlay |
||
51 | * @param array $arguments |
||
52 | */ |
||
53 | public function testGetImage( ImageOverlay $imageOverlay, array $arguments ) { |
||
54 | $this->assertEquals( $arguments[2], $imageOverlay->getImage() ); |
||
55 | } |
||
56 | |||
57 | } |
||
58 | |||
59 | |||
60 | |||
61 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.