Files
icehrm/lib/composer/vendor/consolidation/config/tests/ConfigLoaderTest.php
Thilina Hasantha e7792e7d79 Add pear modules, mail and net_smtp via composer (#93)
Add pear modules, mail and net_smtp via composer, remove php 5.6 build due to phpunit 6
2018-01-08 23:13:43 +01:00

30 lines
877 B
PHP

<?php
namespace Consolidation\Config\Loader;
class ConfigLoaderTest extends \PHPUnit_Framework_TestCase
{
public function testConfigLoader()
{
$loader = new YamlConfigLoader();
// Assert that our test data exists (test the test)
$path = __DIR__ . '/data/config-1.yml';
$this->assertTrue(file_exists($path));
$loader->load($path);
$configFile = basename($loader->getSourceName());
$this->assertEquals('config-1.yml', $configFile);
// Make sure that the data we loaded contained the expected keys
$keys = $loader->keys();
sort($keys);
$keysString = implode(',', $keys);
$this->assertEquals('c,m', $keysString);
$configData = $loader->export();
$this->assertEquals('foo', $configData['c']);
$this->assertEquals('1', $configData['m'][0]);
}
}