mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Sanitize prefix
This commit is contained in:
parent
dafd225a35
commit
de0085767c
2 changed files with 4 additions and 4 deletions
|
@ -853,7 +853,7 @@ EOF;
|
|||
file_put_contents($this->vendorDir.'/c/c/foo/ClassMapBaz.php', '<?php class ClassMapBaz {}');
|
||||
|
||||
$this->generator->setClassMapAuthoritative(true);
|
||||
$this->generator->setApcu('customPrefix');
|
||||
$this->generator->setApcu('custom\'Prefix');
|
||||
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, '_7');
|
||||
|
||||
$this->assertFileExists($this->vendorDir.'/composer/autoload_classmap.php', "ClassMap file needs to be generated.");
|
||||
|
@ -869,7 +869,7 @@ EOF;
|
|||
$this->assertAutoloadFiles('classmap8', $this->vendorDir.'/composer', 'classmap');
|
||||
|
||||
$this->assertStringContainsString('$loader->setClassMapAuthoritative(true);', file_get_contents($this->vendorDir.'/composer/autoload_real.php'));
|
||||
$this->assertStringContainsString('$loader->setApcuPrefix(\'customPrefix\');', file_get_contents($this->vendorDir.'/composer/autoload_real.php'));
|
||||
$this->assertStringContainsString('$loader->setApcuPrefix(\'custom\\\'Prefix\');', file_get_contents($this->vendorDir.'/composer/autoload_real.php'));
|
||||
}
|
||||
|
||||
public function testFilesAutoloadGeneration()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue