public function addColumn($name, $value)
{
if (isset($this[$name])) {
throw new Exception("Column {$name} already in the array!");
}
$this->setColumn($name, $value);
}
public function test_getColumn_shouldPassRowToCallable() { $callbackRow = null; $this->row->addColumn('testClosure', function (Row $row) use(&$callbackRow) { $callbackRow = $row; return $row; }); $returnedRow = $this->row->getColumn('testClosure'); $this->assertNotEmpty($callbackRow); $this->assertSame($returnedRow, $callbackRow); }