public deleteColumn ( string $name ) : boolean | ||
$name | string | The column name. |
return | boolean | `true` on success, `false` if the column does not exist. |
public function deleteColumn($name)
{
if (!$this->offsetExists($name)) {
return false;
}
unset($this[$name]);
return true;
}
public function test_deleteColumn_shouldReturnAColumnValueThatIsNull() { $this->row->setColumn('label', null); $this->assertTrue($this->row->hasColumn('label')); $this->assertTrue($this->row->deleteColumn('label')); $this->assertFalse($this->row->hasColumn('label')); }