/** * @param array $rowData * @return Tx_PtExtlist_Domain_Model_List_Row */ protected function createRowFromTestData(array $rowData) { $row = new Tx_PtExtlist_Domain_Model_List_Row(); $row->setSpecialValues($rowData['specialValues']); foreach ($rowData['columns'] as $key => $testCell) { $cell = new Tx_PtExtlist_Domain_Model_List_Cell($testCell['value']); $cell->setCSSClass($testCell['cssClass']); $cell->setColumnIndex($testCell['columnIndex']); $cell->setRowIndex($testCell['rowIndex']); $cell->addSpecialValue('key1', $testCell['specialValues']['key1']); $row->addCell($cell, $key); } return $row; }
/** * @test */ public function getByArray() { $cell = new Tx_PtExtlist_Domain_Model_List_Cell(); $cell->setValue('testValue'); $cell->setRowIndex(1); $cell->setColumnIndex(2); $cell->addSpecialValue('key1', 'value1'); $cell->setCSSClass('testCssClass'); $this->assertEquals($this->testDataArray, $cell->getAsArray()); }