/**
  * Test the method to dump the autoload_psr4
  */
 public function testDumpAutoloadPsr4()
 {
     Phake::when($this->arrayToText)->arrayToString(Phake::anyParameters())->thenReturn('"AppModule\\\\Module\\\\Bundle\\\\TestBundle\\\\" => "/path/to/module/",');
     $this->dumper->dumpAutoloadPsr4(array('namespace' => 'path'));
     Phake::verify($this->arrayToText)->arrayToString(Phake::anyParameters());
     unlink(static::PATH_AUTOLOAD_PSR4);
     rename(static::PATH_AUTOLOAD_PSR4_CHILD, static::PATH_AUTOLOAD_PSR4);
 }
 /**
  * @param Event $event
  */
 public function run(Event $event)
 {
     $result = array();
     $this->finder->files()->ignoreDotFiles(false)->name($this->moduleContainer->getFilename())->in($this->moduleContainer->getPath());
     /** @var SplFileInfo $file */
     foreach ($this->finder as $file) {
         $moduleInfo = $this->parser->extractRegisterInformation($file);
         $result[$moduleInfo['namespace']] = $moduleInfo['source_dir'];
     }
     $this->dumper->dumpAutoloadPsr4($result);
     $this->dumper->dumpModulesInstalled($this->parser);
 }