コード例 #1
0
 public function testGetsRowDataForResourcTypeCustomAttributes()
 {
     $rows = array(array(ColumnNames::ACCESSORY_NAME => 'an', ColumnNames::ACCESSORY_ID => 1, ColumnNames::RESOURCE_TYPE_ATTRIBUTE_LIST => '1=1!sep!2=!sep!3=3'));
     $report = new CustomReport($rows, $this->attributeRepository);
     $definition = new ReportDefinition($report, null);
     /** @var $row ReportCell[] */
     $row = $definition->GetRow($rows[0]);
     $this->assertEquals(3, count($row));
     $this->assertEquals('an', $row[0]->Value());
     $this->assertEquals('1', $row[1]->Value());
     $this->assertEquals(null, $row[2]->Value(), 'there is no 3rd attribute in the fake');
 }