Completed
Push — newparam ( 72433c...c5fad3 )
by Jeroen De
01:21
created

GeoJsonContentTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 13
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testEmptyJsonIsNotValidContent() 0 3 1
A testMinimalGeoJsonIsValid() 0 5 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace Maps\Tests\Unit\MediaWiki;
6
7
use Maps\MediaWiki\Content\GeoJsonContent;
8
use PHPUnit\Framework\TestCase;
9
10
class GeoJsonContentTest extends TestCase {
11
12
	public function testEmptyJsonIsNotValidContent() {
13
		$this->assertFalse( ( new GeoJsonContent( '{}' ) )->isValid() );
14
	}
15
16
	public function testMinimalGeoJsonIsValid() {
17
		$this->assertTrue( ( new GeoJsonContent(
18
			'{"type": "FeatureCollection", "features": []}'
19
		) )->isValid() );
20
	}
21
22
}
23