TASK: Migrate configuration fixture

* As old globals are not used anymore, we use the API to use our fixture
  file to be returned for tests.

Relates: #82
This commit is contained in:
Daniel Siepmann 2017-06-01 08:20:19 +02:00
parent f8afc920a4
commit 61c4a7b9eb
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -21,6 +21,7 @@ namespace Typo3Update\Tests\Feature;
*/
use PHPUnit\Framework\TestCase;
use PHP_CodeSniffer\Config;
use Typo3Update\Feature\LegacyClassnameMapping;
use org\bovigo\vfs\vfsStream;
@ -53,10 +54,7 @@ class LegacyClassnameMappingTest extends TestCase
$this->fileSystem = vfsStream::setup('root', null, [
'LegacyClassnames.php' => file_get_contents($this->getFixturePath('MappingContent.php')),
]);
$GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'] = [
'mappingFile' => vfsStream::url('root/LegacyClassnames.php'),
];
Config::setConfigData('mappingFile', vfsStream::url('root/LegacyClassnames.php'));
$this->subject = LegacyClassnameMapping::getInstance();
}