Exemplo n.º 1
0
 public function testAddingPsr4AddsEntry()
 {
     $loader = get_composer_loader();
     $currentPsr4Count = count($loader->getPrefixesPsr4());
     add_psr4('Test\\Test\\', '.');
     $newPsr4Count = count($loader->getPrefixesPsr4());
     $this->assertNotEquals($currentPsr4Count, $newPsr4Count);
     $this->assertArrayHasKey('Test\\Test\\', $loader->getPrefixesPsr4());
 }
Exemplo n.º 2
0
 /**
  * Registers a PSR-4 Namespace and directory.
  *
  * @param $namespace
  * @param $directory
  */
 function add_psr4($namespace, $directory)
 {
     get_composer_loader()->setPsr4($namespace, $directory);
 }