/** * Returns true if the named field exists. * * @param string $name The field name * * @return bool true if the field exists, false otherwise * * @api */ public function has($name) { return $this->fields->has($name); }
public function testFormRegistryFieldsCanBeRemoved() { $registry = new FormFieldRegistry(); $registry->add($this->getFormFieldMock('foo')); $registry->remove('foo'); $this->assertFalse($registry->has('foo')); }