Code Duplication    Length = 7-7 lines in 4 locations

test/Psr0Test.php 2 locations

@@ 15-21 (lines=7) @@
12
		$this->loader = new Psr0('/vendor/foo.bar/src');
13
	}
14
15
	public function testExistingFile() {
16
		$loader = $this->loader;
17
18
		$actual = $loader('Foo\Bar\ClassName');
19
		$expect = '/vendor/foo.bar/src/Foo/Bar/ClassName.php';
20
		$this->assertSame($expect, $actual);
21
	}
22
23
	public function testPathSlashConfusion() {
24
		$loader = new Psr0('/vendor/foo.bar/src/');
@@ 23-29 (lines=7) @@
20
		$this->assertSame($expect, $actual);
21
	}
22
23
	public function testPathSlashConfusion() {
24
		$loader = new Psr0('/vendor/foo.bar/src/');
25
26
		$actual = $loader('Foo\Bar\ClassName');
27
		$expect = '/vendor/foo.bar/src/Foo/Bar/ClassName.php';
28
		$this->assertSame($expect, $actual);
29
	}
30
31
}
32
 

test/Psr4Test.php 2 locations

@@ 15-21 (lines=7) @@
12
		$this->loader = new Psr4('Foo\\Bar', '/vendor/foo.bar/src');
13
	}
14
15
	public function testExistingFile() {
16
		$loader = $this->loader;
17
18
		$actual = $loader('Foo\Bar\ClassName');
19
		$expect = '/vendor/foo.bar/src/ClassName.php';
20
		$this->assertSame($expect, $actual);
21
	}
22
23
	public function testMissingFile() {
24
		$loader = $this->loader;
@@ 37-43 (lines=7) @@
34
		$this->assertFalse($actual);
35
	}
36
37
	public function testPathSlashConfusion() {
38
		$loader = new Psr4('Foo\\Bar', '/vendor/foo.bar/src/');
39
40
		$actual = $loader('Foo\Bar\ClassName');
41
		$expect = '/vendor/foo.bar/src/ClassName.php';
42
		$this->assertSame($expect, $actual);
43
	}
44
45
}
46