From 61c4a7b9eb12dcf8b66f2c85309c8a3ff0f19377 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 1 Jun 2017 08:20:19 +0200 Subject: [PATCH] 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 --- tests/Feature/LegacyClassnameMappingTest.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/Feature/LegacyClassnameMappingTest.php b/tests/Feature/LegacyClassnameMappingTest.php index b75a449..7a169d9 100644 --- a/tests/Feature/LegacyClassnameMappingTest.php +++ b/tests/Feature/LegacyClassnameMappingTest.php @@ -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(); }