/**
  * Tests the JApplicationCli::set method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testSet()
 {
     $config = new JRegistry(array('foo' => 'bar'));
     TestReflection::setValue($this->class, 'config', $config);
     $this->assertEquals('bar', $this->class->set('foo', 'car'), 'Checks set returns the previous value.');
     $this->assertEquals('car', $config->get('foo'), 'Checks the new value has been set.');
 }
Exemplo n.º 2
0
 /**
  * Tests the JApplicationCli::set method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testSet()
 {
     $config = new JRegistry(array('foo' => 'bar'));
     $this->inspector->setClassProperty('config', $config);
     $this->assertThat($this->inspector->set('foo', 'car'), $this->equalTo('bar'), 'Checks set returns the previous value.');
     $this->assertThat($config->get('foo'), $this->equalTo('car'), 'Checks the new value has been set.');
 }