コード例 #1
0
 /**
  * Tests the JApplicationCms::getCfg method.
  *
  * @return  void
  *
  * @since   3.2
  */
 public function testGetCfg()
 {
     $config = new Registry(array('foo' => 'bar'));
     TestReflection::setValue($this->class, 'config', $config);
     $this->assertEquals('bar', $this->class->getCfg('foo', 'car'));
     $this->assertEquals('car', $this->class->getCfg('goo', 'car'));
 }
コード例 #2
0
 /**
  * Tests the JApplicationCms::getCfg method.
  *
  * @return  void
  *
  * @since   3.2
  */
 public function testGetCfg()
 {
     $config = new JRegistry(array('foo' => 'bar'));
     TestReflection::setValue($this->class, 'config', $config);
     $this->assertThat($this->class->getCfg('foo', 'car'), $this->equalTo('bar'), 'Checks a known configuration setting is returned.');
     $this->assertThat($this->class->getCfg('goo', 'car'), $this->equalTo('car'), 'Checks an unknown configuration setting returns the default.');
 }