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

AutoloadingAliasesTest::testAliasExists()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 2
eloc 4
nc 1
nop 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