/** * {@inheritdoc} */ public function add($name, $type, array $options = array()) { if (isset($this->columns[$name])) { throw new \InvalidArgumentException('Column name "' . $name . '" already exists.'); } $this->columns[$name] = $this->factory->create($name, $type, $options, $this->defaultColumnOptions)->getColumn(); return $this; }
public function testCreate() { $column = $this->factory->create('foo', 'bar', array(), $this->defaultColumnOptions); $options = $column->getColumn()->getOptions(); $this->assertArrayHasKey('_passed_options', $options); }