/** * Tests the JApplicationWeb::set method. * * @return void * * @since 11.3 */ public function testSet() { $config = new JRegistry(array('foo' => 'bar')); TestReflection::setValue($this->class, 'config', $config); $this->assertThat($this->class->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.'); }
/** * Tests the JApplicationWeb::set method. * * @return void * * @since 11.3 */ public function testSet() { $config = new Registry(array('foo' => 'bar')); TestReflection::setValue($this->class, 'config', $config); $this->assertEquals('bar', $this->class->set('foo', 'car')); $this->assertEquals('car', $config->get('foo')); }
/** * Tests the JApplicationWeb::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.'); }