Completed
Pull Request — master (#657)
by Bene
06:46 queued 03:25
created

AutoloadingAliasesTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 3
c 3
b 0
f 0
lcom 0
cbo 1
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testAliasExists() 0 8 2
A oldNameProvider() 0 5 1
1
<?php
2
3
namespace Wikibase\DataModel\Tests;
4
5
/**
6
 * @licence GNU GPL v2+
7
 * @author Jeroen De Dauw < [email protected] >
8
 */
9
class AutoloadingAliasesTest extends \PHPUnit_Framework_TestCase {
10
11
	/**
12
	 * @dataProvider oldNameProvider
13
	 */
14
	public function testAliasExists( /* $className */ ) {
15
		$this->markTestSkipped( 'No class aliases at the moment' );
16
17
		$this->assertTrue(
18
			class_exists( $className ) || interface_exists( $className ),
0 ignored issues
show
Bug introduced by
The variable $className does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
19
			'Class name "' . $className . '" should still exist as alias'
20
		);
21
	}
22
23
	public function oldNameProvider() {
24
		return array(
25
			// Full qualified aliases go here.
26
		);
27
	}
28
29
}
30