Skip to content

Commit 048bdc4

Browse files
committed
Simplify tests
1 parent 377cac9 commit 048bdc4

File tree

2 files changed

+1
-34
lines changed

2 files changed

+1
-34
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": "^7.0",
2020
"php-di/php-di": "^5.4",
2121
"doctrine/cache": "^1.6",
22-
"mindplay/composer-locator": "^2.1.1"
22+
"mindplay/composer-locator": "^2.1.2"
2323
},
2424
"require-dev": {
2525
"phpunit/phpunit": "^5.7"

tests/Fixture/FakeComposerLocator.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,14 @@
22

33
namespace DI\Kernel\Test\Fixture;
44

5-
use RuntimeException;
6-
75
class FakeComposerLocator extends \ComposerLocator
86
{
97
public static $paths = [];
108

119
public static $rootPath;
1210

13-
public static function getPath($name)
14-
{
15-
$name = strtolower($name);
16-
if (!isset(self::$paths[$name])) {
17-
throw new RuntimeException("Composer package not found: {$name}");
18-
}
19-
20-
return self::getRootPath().self::$paths[$name];
21-
}
22-
2311
public static function getRootPath()
2412
{
2513
return self::$rootPath ?: parent::getRootPath();
2614
}
27-
28-
public static function isInstalled($name)
29-
{
30-
return isset(self::$paths[$name]);
31-
}
32-
33-
public static function getPackages()
34-
{
35-
return array_keys(self::$paths);
36-
}
37-
38-
public static function getPaths()
39-
{
40-
$paths = [];
41-
42-
foreach (self::$paths as $name => $path) {
43-
$paths[$name] = self::getRootPath().$path;
44-
}
45-
46-
return $paths;
47-
}
4815
}

0 commit comments

Comments
 (0)