MediawikiArticleImageTest::testGetWidth()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace PPP\Wikidata;
4
5
use PPP\Wikidata\Wikipedia\MediawikiArticleImage;
6
7
/**
8
 * @covers PPP\Wikidata\Wikipedia\MediawikiArticleImage
9
 *
10
 * @licence MIT
11
 * @author Thomas Pellissier Tanon
12
 */
13
class MediawikiArticleImageTest extends \PHPUnit_Framework_TestCase {
14
15
	public function testGetUrl() {
16
		$articleImage = new MediawikiArticleImage('http://test.org', 1, 1, 'foo');
17
		$this->assertEquals('http://test.org', $articleImage->getUrl());
18
	}
19
20
	public function testGetWidth() {
21
		$articleImage = new MediawikiArticleImage('http://test.org', 1, 1, 'foo');
22
		$this->assertEquals(1, $articleImage->getWidth());
23
	}
24
25
	public function testGetHeight() {
26
		$articleImage = new MediawikiArticleImage('http://test.org', 1, 1, 'foo');
27
		$this->assertEquals(1, $articleImage->getHeight());
28
	}
29
30
	public function testGetTitle() {
31
		$articleImage = new MediawikiArticleImage('http://test.org', 1, 1, 'foo');
32
		$this->assertEquals('foo', $articleImage->getTitle());
33
	}
34
}
35