public function testSetAndGetDisplayAttribute()
 {
     $displayAttribute = new DisplayAttributeForReportForm('ReportsTestModule', 'ReportModelTestItem', Report::TYPE_SUMMATION);
     $this->assertNull($displayAttribute->label);
     $displayAttribute->attributeIndexOrDerivedType = 'string';
     $this->assertEquals('String', $displayAttribute->label);
     $displayAttribute->label = 'someLabel';
     $this->assertEquals('string', $displayAttribute->attributeAndRelationData);
     $this->assertEquals('string', $displayAttribute->attributeIndexOrDerivedType);
     $this->assertEquals('string', $displayAttribute->getResolvedAttribute());
     $this->assertEquals('String', $displayAttribute->getDisplayLabel());
     $this->assertEquals('someLabel', $displayAttribute->label);
     $validated = $displayAttribute->validate();
     $this->assertTrue($validated);
     $displayAttribute = new DisplayAttributeForReportForm('ReportsTestModule', 'ReportModelTestItem', Report::TYPE_SUMMATION);
     $displayAttribute->label = null;
     $validated = $displayAttribute->validate();
     $this->assertFalse($validated);
     $errors = $displayAttribute->getErrors();
     $compareErrors = array('label' => array('Label cannot be blank.'));
     $this->assertEquals($compareErrors, $errors);
     $displayAttribute->label = '';
     $validated = $displayAttribute->validate();
     $this->assertFalse($validated);
     $errors = $displayAttribute->getErrors();
     $compareErrors = array('label' => array('Label cannot be blank.'));
     $this->assertEquals($compareErrors, $errors);
     $displayAttribute->label = 'test';
     $displayAttribute->setAttributes(array('label' => ''));
     $validated = $displayAttribute->validate();
     $this->assertFalse($validated);
     $errors = $displayAttribute->getErrors();
     $compareErrors = array('label' => array('Label cannot be blank.'));
     $this->assertEquals($compareErrors, $errors);
 }