예제 #1
0
 public function testGetAttribute()
 {
     $this->_model->setData(array('id' => 'elementId', 'label' => 'Element Label', 'customAttribute' => 'Custom attribute value'), 'someScope');
     $this->assertEquals('elementId', $this->_model->getAttribute('id'));
     $this->assertEquals('Element Label', $this->_model->getAttribute('label'));
     $this->assertEquals('Custom attribute value', $this->_model->getAttribute('customAttribute'));
     $this->assertNull($this->_model->getAttribute('nonexistingAttribute'));
 }