Adds a type.
public addType ( Symfony\Component\Form\FormTypeInterface $type ) | ||
$type | Symfony\Component\Form\FormTypeInterface | The type |
public function testAddType() { $type = new FooType(); $resolvedType = $this->getMockResolvedType(); $this->resolvedTypeFactory->expects($this->once())->method('createResolvedType')->with($type)->will($this->returnValue($resolvedType)); $this->registry->expects($this->once())->method('addType')->with($resolvedType); $this->factory->addType($type); }
public function testAddType() { $type = new FooType(); $resolvedType = $this->getMockResolvedType(); $this->resolvedTypeFactory->expects($this->once())->method('createResolvedType')->with($type)->will($this->returnValue($resolvedType)); $this->registry->expects($this->once())->method('addType')->with($resolvedType); set_error_handler(array('Symfony\\Component\\Form\\Test\\DeprecationErrorHandler', 'handle')); $this->factory->addType($type); restore_error_handler(); }