コード例 #1
0
 public function testFieldsCanBeRemoved()
 {
     $registry = new FormFieldRegistry();
     $registry->add($this->getFormFieldMock('foo'));
     $registry->remove('foo');
     $this->assertFalse($registry->has('foo'));
 }
コード例 #2
0
ファイル: Form.php プロジェクト: Imangazaliev/Tweezers
 /**
  * Returns true if the named field exists.
  *
  * @param string $name The field name
  *
  * @return bool true if the field exists, false otherwise
  */
 public function offsetExists($name)
 {
     return $this->fields->has($name);
 }