1
0
Fork 0

Merge pull request #3423 from Michael-Gusev/patch-1

Issue #3422
pull/3178/merge
Nils Adermann 2014-11-21 18:59:11 +01:00
commit b23a3cd368
2 changed files with 13 additions and 1 deletions

View File

@ -56,8 +56,11 @@ class ClassLoader
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
return array();
}
public function getPrefixesPsr4()
{

View File

@ -55,4 +55,13 @@ class ClassLoaderTest extends \PHPUnit_Framework_TestCase
array('ShinyVendor\\ShinyPackage\\SubNamespace\\Bar', true),
);
}
/**
* getPrefixes method should return empty array if ClassLoader does not have any psr-0 configuration
*/
public function testGetPrefixesWithNoPSR0Configuration()
{
$loader = new ClassLoader();
$this->assertEmpty($loader->getPrefixes());
}
}