/** * @return array */ public function getDataFieldIndexes() { $indexes = $this->getColumnIndexesById($this->pivotDescription->getDataFields()); return $indexes; }
public function testAddDataFieldWithAggregationType() { $type = AggregationType::MAX; $pivot = new PivotDescription($this->dataTable); $pivot->addDataField('expense', $type); $expected = array('expense'); $actual = $pivot->getDataFields(); $this->assertEquals($expected, $actual); $expected = $type; $actual = $pivot->getAggregationType('expense'); $this->assertNotNull($actual); $this->assertEquals($expected, $actual->getCode()); }