コード例 #1
0
 /**
  * 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.');
 }
コード例 #2
0
 /**
  * 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'));
 }
コード例 #3
0
 /**
  * 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.');
 }