/**
  * Tests the JApplicationCli::loadConfiguration method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testLoadConfiguration()
 {
     $this->assertThat($this->class->loadConfiguration(array('foo' => 'bar')), $this->identicalTo($this->class), 'Check chaining.');
     $this->assertEquals('bar', TestReflection::getValue($this->class, 'config')->get('foo'), 'Check the configuration array was loaded.');
     $this->class->loadConfiguration((object) array('goo' => 'car'));
     $this->assertEquals('car', TestReflection::getValue($this->class, 'config')->get('goo'), 'Check the configuration object was loaded.');
 }
Example #2
0
 /**
  * Tests the JApplicationCli::loadConfiguration method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testLoadConfiguration()
 {
     $this->assertThat($this->inspector->loadConfiguration(array('foo' => 'bar')), $this->identicalTo($this->inspector), 'Check chaining.');
     $this->assertThat($this->inspector->getClassProperty('config')->get('foo'), $this->equalTo('bar'), 'Check the configuration array was loaded.');
     $this->inspector->loadConfiguration((object) array('goo' => 'car'));
     $this->assertThat($this->inspector->getClassProperty('config')->get('goo'), $this->equalTo('car'), 'Check the configuration object was loaded.');
 }