buildFromIniFile() public static method

Factory method
Deprecation: Use ConfigFinder::loadAll() instead.
public static buildFromIniFile ( string $iniFile = null, $constants = [] )
$iniFile string File path for the ini file to parse.
 public function setUp()
 {
     parent::setUp();
     $configFile = APP . 'config/integration.ini';
     $this->config = AssetConfig::buildFromIniFile($configFile);
     $this->middleware = new AssetMiddleware($this->config, sys_get_temp_dir() . DIRECTORY_SEPARATOR, '/assets/');
 }
Esempio n. 2
0
 public function setUp()
 {
     parent::setUp();
     $this->_testFiles = APP;
     $this->_themeConfig = $this->_testFiles . 'config' . DS . 'themed.ini';
     $this->_pluginConfig = $this->_testFiles . 'config' . DS . 'plugins.ini';
     $testFile = $this->_testFiles . 'config' . DS . 'integration.ini';
     $this->config = AssetConfig::buildFromIniFile($testFile);
     $this->config->paths('js', null, array($this->_testFiles . 'js' . DS, $this->_testFiles . 'js' . DS . '*'));
     $this->config->paths('css', null, array($this->_testFiles . 'css' . DS, $this->_testFiles . 'css' . DS . '*'));
 }
 public function setUp()
 {
     parent::setUp();
     $cli = $this->getMock('League\\CLImate\\CLImate', ['usage', 'out', 'err']);
     $cli->expects($this->any())->method('out')->will($this->returnSelf());
     $config = AssetConfig::buildFromIniFile(APP . 'config/integration.ini', ['WEBROOT' => TMP]);
     $this->task = new BuildTask($cli, $config);
     $this->cli = $cli;
     mkdir(TMP . 'cache_js');
     mkdir(TMP . 'cache_css');
 }
Esempio n. 4
0
 public function testWriter()
 {
     $config = AssetConfig::buildFromIniFile($this->integrationFile);
     $config->theme('Red');
     $config->set('js.timestamp', true);
     $factory = new Factory($config);
     $writer = $factory->writer();
     $expected = ['timestamp' => ['js' => true, 'css' => false], 'path' => TMP, 'theme' => 'Red'];
     $this->assertEquals($expected, $writer->config());
 }
Esempio n. 5
0
 public function testIsThemed()
 {
     $this->assertFalse($this->config->isThemed('libs.js'));
     $config = AssetConfig::buildFromIniFile($this->_themeConfig);
     $this->assertTrue($config->isThemed('themed.css'));
 }