Completed
Push — 21x ( 0e3ed4...f4f4da )
by adam
17:20 queued 21s
created

AutoloadingAliasesTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testAliasExists() 0 6 2
B oldNameProvider() 0 26 1
1
<?php
2
3
namespace Diff\Tests;
4
5
/**
6
 * @license GPL-2.0+
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->assertTrue(
16
			class_exists( $className ) || interface_exists( $className ),
17
			'Class name "' . $className . '" should still exist as alias'
18
		);
19
	}
20
21
	public function oldNameProvider() {
22
		return array(
23
			array( 'Diff\Diff' ),
24
			array( 'Diff\MapDiff' ),
25
			array( 'Diff\ListDiff' ),
26
27
			array( 'Diff\AtomicDiffOp' ),
28
			array( 'Diff\DiffOp' ),
29
			array( 'Diff\DiffOpAdd' ),
30
			array( 'Diff\DiffOpChange' ),
31
			array( 'Diff\DiffOpRemove' ),
32
33
			array( 'Diff\CallbackListDiffer' ),
34
			array( 'Diff\Differ' ),
35
			array( 'Diff\ListDiffer' ),
36
			array( 'Diff\MapDiffer' ),
37
			array( 'Diff\OrderedListDiffer' ),
38
39
			array( 'Diff\ListPatcher' ),
40
			array( 'Diff\MapPatcher' ),
41
			array( 'Diff\Patcher' ),
42
			array( 'Diff\PatcherException' ),
43
			array( 'Diff\PreviewablePatcher' ),
44
			array( 'Diff\ThrowingPatcher' ),
45
		);
46
	}
47
48
}
49