示例#1
0
 /**
  * Test collect config, format var, order config
  */
 public function testCollect()
 {
     $config = new Config();
     $config->set('foo', 'bar');
     $config->set('bar', 'foo');
     $configDataCollector = new ConfigDataCollector($config);
     $dataFormatter = new DataFormatter();
     $this->assertEquals(array('bar' => $dataFormatter->formatVar('foo'), 'foo' => $dataFormatter->formatVar('bar')), $configDataCollector->collect());
 }
示例#2
0
文件: ConfigTest.php 项目: itkg/core
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testNoValueException()
 {
     $this->config->offsetUnset('foo');
     $this->config->get('foo');
 }