示例#1
0
 /**
  * Test JViewLegacy::get()
  *
  * @since   11.3
  *
  * @return  void
  */
 public function testGet()
 {
     $this->class->test = 'pass';
     $test2 = new ModelMockupJView();
     $test2->name = 'test2';
     TestReflection::setValue($this->class, '_models', array('test1' => new ModelMockupJView(), 'test2' => $test2));
     TestReflection::setValue($this->class, '_defaultModel', 'test1');
     $this->assertEquals('model', $this->class->get('Name'), 'Checks getName from default model.');
     $this->assertEquals('pass', $this->class->get('test'), 'Checks property from view.');
     $this->assertEquals('test2', $this->class->get('Name', 'test2'), 'Checks getName from model 2.');
 }
示例#2
0
 public function get($property, $default = null)
 {
     KUNENA_PROFILER ? $this->profiler->start("model get{$property}") : null;
     $result = parent::get($property, $default);
     KUNENA_PROFILER ? $this->profiler->stop("model get{$property}") : null;
     return $result;
 }