public function testStylesCompile()
 {
     $setupAfterCache = new SetupAfterCache(BootstrapManager::getInstance(), $GLOBALS);
     $setupAfterCache->process();
     $resourceLoaderContext = $this->getMockBuilder('\\ResourceLoaderContext')->disableOriginalConstructor()->getMock();
     $module = new ResourceLoaderBootstrapModule($GLOBALS['wgResourceModules']['ext.bootstrap.styles']);
     $module->setCache(new HashBagOStuff());
     $styles = $module->getStyles($resourceLoaderContext);
     $css = CSSMin::minify($styles['all']);
     $this->assertNotEquals('', $css);
 }
 /**
  * @covers ::process
  * @covers ::addLateSettings
  *
  * @depends testAdjustConfiguration
  *
  * @dataProvider lateSettingsProvider
  */
 public function testProcessWithLateSettingsToAdjustConfiguration($configuration, $expected)
 {
     $bootstrapManager = $this->getMockBuilder('\\Bootstrap\\BootstrapManager')->disableOriginalConstructor()->getMock();
     $defaultConfiguration = array('IP' => 'notTestingIP', 'wgStyleDirectory' => 'notTestingwgStyleDirectory', 'wgStylePath' => 'notTestingwgStylePath');
     $configurationToBeAdjusted = array();
     $instance = new SetupAfterCache($bootstrapManager, $configuration + $defaultConfiguration);
     $instance->process()->adjustConfiguration($configurationToBeAdjusted);
     $this->assertEquals($expected + $defaultConfiguration, $configurationToBeAdjusted);
 }
 /**
  * @covers ::process
  * @covers ::addLateSettings
  *
  * @depends testAdjustConfiguration
  *
  * @dataProvider lateSettingsProvider
  */
 public function testProcessWithLateSettingsToAdjustConfiguration($configuration, $expected)
 {
     $bootstrapManager = $this->getMockBuilder('\\Bootstrap\\BootstrapManager')->disableOriginalConstructor()->getMock();
     $dir = $this->getWorkDirectory();
     $IP = dirname(dirname($dir));
     $defaultConfiguration = array('IP' => $IP, 'wgScriptPath' => 'notTestingwgScriptPath', 'wgStylePath' => 'notTestingwgStylePath', 'wgStyleDirectory' => 'notTestingwgStyleDirectory', 'wgResourceModules' => array());
     $expected['chameleonLocalPath'] = $defaultConfiguration['wgStyleDirectory'] . '/chameleon';
     $expected['chameleonRemotePath'] = $defaultConfiguration['wgStylePath'] . '/chameleon';
     $expected['wgResourceModules'] = array();
     $expected['wgResourceModules']['skin.chameleon.jquery-sticky'] = array('localBasePath' => $expected['chameleonLocalPath'] . '/resources/js', 'remoteBasePath' => $expected['chameleonRemotePath'] . '/resources/js', 'group' => 'skin.chameleon', 'skinScripts' => array('chameleon' => array('jquery-sticky/jquery.sticky.js', 'Components/Modifications/sticky.js')));
     $configurationToBeAdjusted = $configuration + $defaultConfiguration;
     $instance = new SetupAfterCache($bootstrapManager, $configurationToBeAdjusted);
     $instance->process();
     $this->assertEquals($expected + $defaultConfiguration, $configurationToBeAdjusted);
 }