|
@@ 71-80 (lines=10) @@
|
| 68 |
|
); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
public function testExistingFile() |
| 72 |
|
{ |
| 73 |
|
$actual = $this->loader->loadClass('Foo\Bar\ClassName'); |
| 74 |
|
$expect = '/vendor/foo.bar/src/ClassName.php'; |
| 75 |
|
$this->assertSame($expect, $actual); |
| 76 |
|
|
| 77 |
|
$actual = $this->loader->loadClass('Foo\Bar\ClassNameTest'); |
| 78 |
|
$expect = '/vendor/foo.bar/tests/ClassNameTest.php'; |
| 79 |
|
$this->assertSame($expect, $actual); |
| 80 |
|
} |
| 81 |
|
|
| 82 |
|
public function testMissingFile() |
| 83 |
|
{ |
|
@@ 95-104 (lines=10) @@
|
| 92 |
|
$this->assertSame($expect, $actual); |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
public function testConfusion() |
| 96 |
|
{ |
| 97 |
|
$actual = $this->loader->loadClass('Foo\Bar\DoomClassName'); |
| 98 |
|
$expect = '/vendor/foo.bar/src/DoomClassName.php'; |
| 99 |
|
$this->assertSame($expect, $actual); |
| 100 |
|
|
| 101 |
|
$actual = $this->loader->loadClass('Foo\BarDoom\ClassName'); |
| 102 |
|
$expect = '/vendor/foo.bardoom/src/ClassName.php'; |
| 103 |
|
$this->assertSame($expect, $actual); |
| 104 |
|
} |
| 105 |
|
} |